diff options
Diffstat (limited to 'usr/src/uts/sun4v')
145 files changed, 622 insertions, 3704 deletions
diff --git a/usr/src/uts/sun4v/Makefile b/usr/src/uts/sun4v/Makefile index 4597f6d9f4..f16af3e3c8 100644 --- a/usr/src/uts/sun4v/Makefile +++ b/usr/src/uts/sun4v/Makefile @@ -41,55 +41,29 @@ USR_GLENDALE_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-T6320 USR_GLENDALE_SBIN_DIR = $(USR_GLENDALE_DIR)/sbin USR_GLENDALE_LIB_DIR = $(USR_GLENDALE_DIR)/lib - -# -# The following are SPARC specific (rather than sun4v) specific modules -# which are required for the sun4v kernel to completely lint. They are -# not involved in the build in any other way. In order to minimize -# build time, it is assumed that they are up to date. But since sun4v -# is really a separate architecture we cannot use the v7 sparc modules. -# -SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) - -SPARC_LINTS = - -# -# -# -LINT_LIBS = $(LINT_LIB) \ - $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ - $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ - $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln) - def := TARGET= def all := TARGET= all install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check .KEEP_STATE: -.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ - modlist modlist.sparc +.PARALLEL: $(PARALLEL_KMODS) $(XMODS) modlist modlist.sparc # Override for CPU_KMODS... they cannot be built # in parallel .NO_PARALLEL: $(CPU_KMODS) -def all clean clobber clean.lint: genassym unix .WAIT \ - $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) +def all clean clobber: genassym unix .WAIT \ + $(KMODS) $(XMODS) $(IMPLEMENTATIONS) # list the modules under sun4v. -modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ - $(IMPLEMENTATIONS) +modlist: unix $(KMODS) $(XMODS) $(IMPLEMENTATIONS) # list the modules for Install -k sun4v. modlist.karch: modlist modlist.sparc @@ -97,12 +71,8 @@ modlist.karch: modlist modlist.sparc modlist.sparc: @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist -install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \ - $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) - -lintlib: unix - -modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS) +install: install_platforms genassym unix .WAIT $(KMODS) \ + $(XMODS) $(IMPLEMENTATIONS) genassym unix $(KMODS): FRC @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) @@ -111,22 +81,7 @@ $(IMPLEMENTATIONS): FRC @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET) $(XMODS): FRC - @if [ -f $@/Makefile ]; then \ - cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ - else \ - true; \ - fi - -$(CLOSED_XMODS): FRC - @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \ - cd $(CLOSED)/uts/sun4v/$@; pwd; \ - $(MAKE) $(NO_STATE) $(TARGET); \ - else \ - true; \ - fi - -$(CLOSED_KMODS): FRC - cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET) + cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) install_h check: install_platforms $(IMPLEMENTATIONS) FRC @cd sys; pwd; $(MAKE) $(TARGET) @@ -282,18 +237,6 @@ $(USR_MONZA_SBIN_DIR): $(USR_MONZA_DIR) $(USR_MONZA_SBIN_LINKS): $(USR_MONZA_SBIN_DIR) $(INS.slink7) -# -# Full kernel lint target. -# -LINT_TARGET = globallint - -globallint: - @-$(ECHO) "\nSUN4V KERNEL: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - -lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \ - $(IMPLEMENTATIONS) $(LINT_CPU_KMODS) - include ../Makefile.targ # diff --git a/usr/src/uts/sun4v/Makefile.files b/usr/src/uts/sun4v/Makefile.files index 66565f9c4f..531826ec2c 100644 --- a/usr/src/uts/sun4v/Makefile.files +++ b/usr/src/uts/sun4v/Makefile.files @@ -23,7 +23,7 @@ # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # # This Makefile defines all file modules for the directory uts/sun4v -# and it's children. These are the source files which are sun4v +# and its children. These are the source files which are sun4v # "implementation architecture" dependent. # @@ -115,7 +115,7 @@ SPECIAL_OBJS += intrq.o # driver modules # ROOTNEX_OBJS += mach_rootnex.o -PX_OBJS += px_lib4v.o px_err.o px_tools_4v.o px_hcall.o px_libhv.o +PX_OBJS += px_lib4v.o px_err.o px_tools_4v.o px_hcall.o px_libhv.o FPC_OBJS += fpc-impl-4v.o fpc-asm-4v.o N2PIUPC_OBJS += n2piupc.o n2piupc_tables.o n2piupc_kstats.o \ n2piupc_biterr.o n2piupc_asm.o @@ -127,7 +127,7 @@ N2RNG_OBJS += n2rng.o n2rng_debug.o n2rng_hcall.o n2rng_kcf.o \ n2rng_provider.o # -# CPU/Memory Error Injector (memtest) sun4v driver +# CPU/Memory Error Injector (memtest) sun4v driver # MEMTEST_OBJS += memtest.o memtest_asm.o \ memtest_v.o memtest_v_asm.o \ @@ -204,12 +204,10 @@ PLATMOD_OBJS = platmod.o # ALL_DEFS += -Dsun4u -Dsun4v INC_PATH += -I$(UTSBASE)/sun4v + # # Since assym.h is a derived file, the dependency must be explicit for -# all files including this file. (This is only actually required in the -# instance when the .make.state file does not exist.) It may seem that -# the lint targets should also have a similar dependency, but they don't -# since only C headers are included when #defined(lint) is true. +# all files including this file. # ASSYM_DEPS += mach_locore.o ASSYM_DEPS += module_sfmmu_asm.o diff --git a/usr/src/uts/sun4v/Makefile.rules b/usr/src/uts/sun4v/Makefile.rules index 7675e358fd..1de50c337c 100644 --- a/usr/src/uts/sun4v/Makefile.rules +++ b/usr/src/uts/sun4v/Makefile.rules @@ -169,108 +169,3 @@ $(OBJS_DIR)/dtracestubs.s: $(UNIX_O) $(LIBS) $(DTRACESTUBS): $(DTRACESTUBS_O) $(BUILD.SO) $(DTRACESTUBS_O) - -# -# Section 1b: Lint `object' build rules -# -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/cpu/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/cpu/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/px/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/px/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/niumx/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/fpc/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/fpc/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/n2piupc/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/n2piupc/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/iospc/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/iospc/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/glvc/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/glvc/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/n2rng/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/n2rng/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/pciex/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/pciex/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/ml/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/os/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/pcbe/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/brand/sn1/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/brand/solaris10/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/promif/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/vm/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/vm/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sfmmu/ml/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sfmmu/vm/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sparc/os/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/common/os/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(SRC)/common/mdesc/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(SRC)/common/atomic/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(SRC)/common/crypto/arcfour/sun4v/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) diff --git a/usr/src/uts/sun4v/Makefile.sun4v b/usr/src/uts/sun4v/Makefile.sun4v index f1d8cc13d2..ecc3f509db 100644 --- a/usr/src/uts/sun4v/Makefile.sun4v +++ b/usr/src/uts/sun4v/Makefile.sun4v @@ -107,8 +107,6 @@ UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix GENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix MODSTUBS_DIR = $(UNIX_DIR) DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym -LINTS_DIR = $(OBJS_DIR) -LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR) DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so @@ -117,12 +115,6 @@ UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so -LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln -GEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln - -LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%) -LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) - # # cpu and platform modules need to know how to build their own symcheck module # @@ -200,9 +192,7 @@ ASFLAGS += $(AS_XARCH) -DGLREG AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR) -LINT_KMODS += $(GENUNIX_KMODS) -LINT_DEFS = -m64 # # The following must be defined for all implementations: @@ -424,7 +414,6 @@ XMODS += # CPU_KMODS += generic niagara niagara2 vfalls kt -LINT_CPU_KMODS += generic # # Performance Counter BackEnd Modules (/usr/kernel/pcbe): diff --git a/usr/src/uts/sun4v/arcfour/Makefile b/usr/src/uts/sun4v/arcfour/Makefile index d97ef72d2d..5914ed57a2 100644 --- a/usr/src/uts/sun4v/arcfour/Makefile +++ b/usr/src/uts/sun4v/arcfour/Makefile @@ -42,7 +42,6 @@ COM_DIR = $(COMMONBASE)/crypto/arcfour # MODULE = arcfour OBJECTS = $(ARCFOUR_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(ARCFOUR_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CRYPTO_DIR)/$(MODULE) # @@ -54,14 +53,9 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) -I$(COM_DIR) -LINTFLAGS += -I$(COM_DIR) # # Turn on doubleword alignment for 64 bit registers @@ -91,12 +85,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/bge/Makefile b/usr/src/uts/sun4v/bge/Makefile index 6a99f9e374..fea223293b 100644 --- a/usr/src/uts/sun4v/bge/Makefile +++ b/usr/src/uts/sun4v/bge/Makefile @@ -38,7 +38,6 @@ UTSBASE = ../.. # MODULE = bge OBJECTS = $(BGE_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(LINTS_DIR)/bge_lint.ln ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/common/io/bge @@ -51,15 +50,9 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign @@ -67,15 +60,14 @@ CFLAGS += -dalign # # Driver depends on MAC & IP # -LDFLAGS += -dy -N misc/mac -N drv/ip +LDFLAGS += -N misc/mac -N drv/ip # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - +CFLAGS += $(CCVERBOSE) CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses @@ -95,12 +87,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/bootdev/Makefile b/usr/src/uts/sun4v/bootdev/Makefile index 4b393be29b..c21ddaf803 100644 --- a/usr/src/uts/sun4v/bootdev/Makefile +++ b/usr/src/uts/sun4v/bootdev/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = bootdev OBJECTS = $(BOOTDEV_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(BOOTDEV_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -51,21 +50,14 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON - +CFLAGS += $(CCVERBOSE) CERRWARN += $(CNOWARN_UNINIT) # @@ -81,12 +73,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/cnex/Makefile b/usr/src/uts/sun4v/cnex/Makefile index 30052a3a0b..e2cc736327 100644 --- a/usr/src/uts/sun4v/cnex/Makefile +++ b/usr/src/uts/sun4v/cnex/Makefile @@ -19,11 +19,10 @@ # CDDL HEADER END # # -# uts/sun4v/cnex/Makefile # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the cnex driver kernel module. # @@ -38,9 +37,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = cnex +MODULE = cnex OBJECTS = $(CNEX_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(CNEX_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -59,25 +57,14 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # # Module dependencies # -LDFLAGS += -dy -Nmisc/ldc - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN +LDFLAGS += -Nmisc/ldc # # Default build targets. @@ -92,12 +79,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/cpc/Makefile b/usr/src/uts/sun4v/cpc/Makefile index 15662586ea..e59745c852 100644 --- a/usr/src/uts/sun4v/cpc/Makefile +++ b/usr/src/uts/sun4v/cpc/Makefile @@ -19,11 +19,10 @@ # CDDL HEADER END # # -# uts/sun4v/cpc/Makefile # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the cpc kernel module. # @@ -40,7 +39,6 @@ UTSBASE = ../.. # MODULE = cpc OBJECTS = $(CPC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(CPC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) ROOTLINK = $(ROOT_PSM_SYS_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/common/io @@ -54,22 +52,11 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - -# # Default build targets. # .KEEP_STATE: @@ -82,12 +69,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(ROOTLINK): $(ROOT_PSM_SYS_DIR) $(ROOTMODULE) 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; diff --git a/usr/src/uts/sun4v/dr_cpu/Makefile b/usr/src/uts/sun4v/dr_cpu/Makefile index f4a96fa25a..c8c93de38b 100644 --- a/usr/src/uts/sun4v/dr_cpu/Makefile +++ b/usr/src/uts/sun4v/dr_cpu/Makefile @@ -23,8 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # # Path to the base of the uts directory tree (usually /usr/src/uts). @@ -36,7 +34,6 @@ UTSBASE = ../.. # MODULE = dr_cpu OBJECTS = $(DR_CPU_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DR_CPU_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -48,15 +45,9 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign @@ -64,7 +55,7 @@ CFLAGS += -dalign # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ds -Ndrv/drctl +LDFLAGS += -Nmisc/ds -Ndrv/drctl # # Default build targets. @@ -79,12 +70,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/dr_io/Makefile b/usr/src/uts/sun4v/dr_io/Makefile index 64346521b0..97a9804ade 100644 --- a/usr/src/uts/sun4v/dr_io/Makefile +++ b/usr/src/uts/sun4v/dr_io/Makefile @@ -35,7 +35,6 @@ UTSBASE = ../.. # MODULE = dr_io OBJECTS = $(DR_IO_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DR_IO_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -47,11 +46,12 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses @@ -65,7 +65,7 @@ CFLAGS += -dalign # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ds -Ndrv/drctl +LDFLAGS += -Nmisc/ds -Ndrv/drctl # # Default build targets. @@ -80,12 +80,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/dr_mem/Makefile b/usr/src/uts/sun4v/dr_mem/Makefile index f55ea3ef6b..2ef79f2e40 100644 --- a/usr/src/uts/sun4v/dr_mem/Makefile +++ b/usr/src/uts/sun4v/dr_mem/Makefile @@ -34,7 +34,6 @@ UTSBASE = ../.. # MODULE = dr_mem OBJECTS = $(DR_MEM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DR_MEM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -46,13 +45,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses # @@ -63,7 +57,7 @@ CFLAGS += -dalign # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ds -Nmisc/platsvc -Ndrv/drctl +LDFLAGS += -Nmisc/ds -Nmisc/platsvc -Ndrv/drctl # # Default build targets. @@ -78,12 +72,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/drctl/Makefile b/usr/src/uts/sun4v/drctl/Makefile index 32627e5c9f..97be19dc62 100644 --- a/usr/src/uts/sun4v/drctl/Makefile +++ b/usr/src/uts/sun4v/drctl/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the drctl kernel module. # @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = drctl OBJECTS = $(DRCTL_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DRCTL_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io @@ -53,12 +52,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# CFLAGS += -v # @@ -79,12 +74,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ds/Makefile b/usr/src/uts/sun4v/ds/Makefile index ed43f2f58e..1c07354105 100644 --- a/usr/src/uts/sun4v/ds/Makefile +++ b/usr/src/uts/sun4v/ds/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = ds OBJECTS = $(DS_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DS_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -52,15 +51,9 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign @@ -68,14 +61,7 @@ CFLAGS += -dalign # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ldc - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN +LDFLAGS += -Nmisc/ldc CERRWARN += $(CNOWARN_UNINIT) @@ -92,12 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ds_pri/Makefile b/usr/src/uts/sun4v/ds_pri/Makefile index 4fd9d986af..6623d4cfdc 100644 --- a/usr/src/uts/sun4v/ds_pri/Makefile +++ b/usr/src/uts/sun4v/ds_pri/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = ds_pri OBJECTS = $(DS_PRI_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DS_PRI_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io @@ -60,18 +59,19 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += $(CNOWARN_UNINIT) # # Module Dependencies -LDFLAGS += -dy -Nmisc/ds +LDFLAGS += -Nmisc/ds # # Default build targets. @@ -86,12 +86,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ds_snmp/Makefile b/usr/src/uts/sun4v/ds_snmp/Makefile index ec79c5d9d5..9fd9f1cc2e 100644 --- a/usr/src/uts/sun4v/ds_snmp/Makefile +++ b/usr/src/uts/sun4v/ds_snmp/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the pseudo device # to access the sun4v SNMP @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = ds_snmp OBJECTS = $(DS_SNMP_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(DS_SNMP_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io @@ -60,17 +59,13 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# CFLAGS += -v # # Module Dependencies -LDFLAGS += -dy -Nmisc/ds +LDFLAGS += -Nmisc/ds # # Default build targets. @@ -85,12 +80,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ebus/Makefile b/usr/src/uts/sun4v/ebus/Makefile index a278c5ed3d..3ccc56ce24 100644 --- a/usr/src/uts/sun4v/ebus/Makefile +++ b/usr/src/uts/sun4v/ebus/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = ebus OBJECTS = $(EBUS_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(EBUS_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -52,29 +51,19 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# Turn this on once compiler understands v9 in it's backend -#INLINES += $(UTSBASE)/sun4v/io/ebus.il - -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - # # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - +CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-switch CERRWARN += $(CNOWARN_UNINIT) @@ -91,12 +80,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/fault_iso/Makefile b/usr/src/uts/sun4v/fault_iso/Makefile index 37188fcfff..8114f1f01e 100644 --- a/usr/src/uts/sun4v/fault_iso/Makefile +++ b/usr/src/uts/sun4v/fault_iso/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the fault_iso kernel module. # @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = fault_iso OBJECTS = $(FAULT_ISO_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(FAULT_ISO_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -52,12 +51,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += -v # @@ -68,7 +63,7 @@ CFLAGS += -dalign # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ds +LDFLAGS += -Nmisc/ds # # Default build targets. @@ -83,12 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/fpc/Makefile b/usr/src/uts/sun4v/fpc/Makefile index 904ebf0859..34d73deb1d 100644 --- a/usr/src/uts/sun4v/fpc/Makefile +++ b/usr/src/uts/sun4v/fpc/Makefile @@ -41,7 +41,6 @@ UTSBASE = ../.. # MODULE = fpc OBJECTS = $(FPC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(FPC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4/io/fpc @@ -54,7 +53,6 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # @@ -64,7 +62,9 @@ INC_PATH += -I$(UTSBASE)/sun4/io/fpc INC_PATH += -I$(UTSBASE)/sun4v/io/fpc # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-variable @@ -75,11 +75,10 @@ CERRWARN += -_gcc=-Wno-unused-variable CFLAGS += -dalign # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_STATIC_UNUSED # # Default build targets. @@ -94,12 +93,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/genassym/Makefile b/usr/src/uts/sun4v/genassym/Makefile index a537ca15fb..274d61aa0f 100644 --- a/usr/src/uts/sun4v/genassym/Makefile +++ b/usr/src/uts/sun4v/genassym/Makefile @@ -23,7 +23,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of assym.h through genconst/stabs. # @@ -78,8 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -clean.lint: - install: def # diff --git a/usr/src/uts/sun4v/generic/Makefile b/usr/src/uts/sun4v/generic/Makefile index f1b348c336..193dc28b8e 100644 --- a/usr/src/uts/sun4v/generic/Makefile +++ b/usr/src/uts/sun4v/generic/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = generic OBJECTS = $(GENERIC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(GENERIC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE) SOFTLINKS = sun4v ROOTSOFTLINKS = $(SOFTLINKS:%=$(ROOT_PSM_CPU_DIR)/%) @@ -62,11 +61,12 @@ CLEANFILES += $(CPULIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = def $(BINARY) $(ROOTMODULE) $(ROOTSOFTLINKS) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses @@ -105,12 +105,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(CPULIB): $(OBJECTS) diff --git a/usr/src/uts/sun4v/genunix/Makefile b/usr/src/uts/sun4v/genunix/Makefile index 37beecd4ee..355e8b2639 100644 --- a/usr/src/uts/sun4v/genunix/Makefile +++ b/usr/src/uts/sun4v/genunix/Makefile @@ -44,24 +44,12 @@ GENUNIX = $(OBJS_DIR)/$(MODULE) OBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \ $(NOT_YET_KMODS:%=$(OBJS_DIR)/%) -LINTS = $(GENUNIX_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) - ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(MODULE) PLATFORM = sun4v LIBGEN = $(OBJS_DIR)/libgenunix.so LIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%) -# LINTFLAGS will be set to include definitions so that the cpu_t -# structure is expanded. However this could be set to look at the -# sun4u version which is not correct for sun4v. Therefore we only -# want to use the LINTFLAGS modification in this Makefile and so -# suppress the usage of the LINTFLAGS setting in the Makefile.sparc -# file. -# -LINTFLAGSUPPRESS = $(POUND_SIGN) - # # Include common rules. # @@ -71,7 +59,6 @@ include $(UTSBASE)/sparc/Makefile.sparc # Define targets # ALL_TARGET = $(LIBGEN) $(GENUNIX) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(LIBGEN) $(GENUNIX) $(ROOTMODULE) # @@ -79,10 +66,6 @@ INSTALL_TARGET = $(LIBGEN) $(GENUNIX) $(ROOTMODULE) # CLEANFILES += $(LIBSTUBS) $(LIBGEN) -LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR) -LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln -GEN_LINT_LIB = - BINARY = CLOBBERFILES += $(GENUNIX) @@ -98,26 +81,11 @@ IPCTF_TARGET = $(IPCTF) $(PATCH_BUILD)IPCTF_TARGET = # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) -CPPFLAGS += -I$(SRC)/common -CPPFLAGS += -I$(SRC)/uts/common/fs/zfs - -INC_PATH += -I$(UTSBASE)/sun4 - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - +CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-value @@ -129,11 +97,9 @@ CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-empty-body - -# Ensure that lint sees 'struct cpu' containing a fully declared -# embedded 'struct machcpu'. -# -LINTFLAGS += -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu +CPPFLAGS += -I$(SRC)/common +CPPFLAGS += -I$(SRC)/uts/common/fs/zfs +INC_PATH += -I$(UTSBASE)/sun4 # # Default build targets. @@ -150,12 +116,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(LIBGEN): $(OBJECTS) $(LIBSTUBS) @@ -163,7 +123,7 @@ $(LIBGEN): $(OBJECTS) $(LIBSTUBS) $(GENUNIX): $(IPCTF_TARGET) $(OBJECTS) @pwd - $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS) + $(LD) -ztype=kmod $(LDFLAGS) -o $@ $(OBJECTS) $(CTFMERGE_GENUNIX_MERGE) $(POST_PROCESS) diff --git a/usr/src/uts/sun4v/glvc/Makefile b/usr/src/uts/sun4v/glvc/Makefile index 997f92cef7..5d44984f49 100644 --- a/usr/src/uts/sun4v/glvc/Makefile +++ b/usr/src/uts/sun4v/glvc/Makefile @@ -22,9 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# This makefile drives the production of the virtual channel driver +# This makefile drives the production of the virtual channel driver # kernel module. # # sun4v implementation architecture dependent @@ -38,9 +36,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = glvc +MODULE = glvc OBJECTS = $(GLVC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(GLVC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -59,24 +56,9 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON - -# # Default build targets. # .KEEP_STATE: @@ -89,12 +71,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/huron/Makefile b/usr/src/uts/sun4v/huron/Makefile index 8d4f916baf..43441a2dcf 100644 --- a/usr/src/uts/sun4v/huron/Makefile +++ b/usr/src/uts/sun4v/huron/Makefile @@ -50,12 +50,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -65,8 +61,6 @@ check := TARGET= check def: -lintlib: unix - IMPLEMENTED_PLATFORM = SUNW,SPARC-Enterprise-T5120 LINKED_PLATFORMS = SUNW,SPARC-Enterprise-T5220 @@ -80,7 +74,6 @@ install: $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) install_h check: -lint: clean: diff --git a/usr/src/uts/sun4v/io/cnex.c b/usr/src/uts/sun4v/io/cnex.c index 5586b342a4..287648f1e4 100644 --- a/usr/src/uts/sun4v/io/cnex.c +++ b/usr/src/uts/sun4v/io/cnex.c @@ -659,7 +659,7 @@ cnex_add_intr(dev_info_t *dip, uint64_t id, cnex_intrtype_t itype, iinfo->arg1 = arg1; iinfo->arg2 = arg2; - /* save data for DTrace probes used by intrstat(1m) */ + /* save data for DTrace probes used by intrstat(8) */ iinfo->dip = cldcp->dip; iinfo->id = cldcp->id; diff --git a/usr/src/uts/sun4v/io/dr_cpu.c b/usr/src/uts/sun4v/io/dr_cpu.c index f2cfbb5873..2c182c1174 100644 --- a/usr/src/uts/sun4v/io/dr_cpu.c +++ b/usr/src/uts/sun4v/io/dr_cpu.c @@ -411,7 +411,7 @@ dr_cpu_list_wrk(dr_cpu_hdr_t *req, dr_cpu_hdr_t **resp, int *resp_len) case DR_CPU_FORCE_UNCONFIG: drctl_flags = DRCTL_FLAG_FORCE; force = B_TRUE; - _NOTE(FALLTHROUGH) + /* FALLTHROUGH */ case DR_CPU_UNCONFIGURE: dr_fn = dr_cpu_unconfigure; drctl_cmd = DRCTL_CPU_UNCONFIG_REQUEST; @@ -583,7 +583,7 @@ dr_cpu_res_array_init(dr_cpu_hdr_t *req, drctl_rsrc_t *rsrc, int nrsrc) * on the memory allocated for the message buffer * itself. */ - if (rsrc[idx].offset != NULL) { + if (rsrc[idx].offset != 0) { err_str = (char *)rsrc + rsrc[idx].offset; err_len = strlen(err_str) + 1; @@ -1175,7 +1175,7 @@ dr_cpu_unconfigure(processorid_t cpuid, int *status, boolean_t force) * Otherwise, cpu_offline() might reject the request. Note: * if the offline subsequently fails, the target cpu will be * left with interrupts enabled. This is consistent with the - * behavior of psradm(1M) and p_online(2). + * behavior of psradm(8) and p_online(2). */ cpu_intr_enable(cp); diff --git a/usr/src/uts/sun4v/io/dr_mem.c b/usr/src/uts/sun4v/io/dr_mem.c index c9695e7c6f..2443f4d550 100644 --- a/usr/src/uts/sun4v/io/dr_mem.c +++ b/usr/src/uts/sun4v/io/dr_mem.c @@ -611,7 +611,7 @@ dr_mem_res_array_init(dr_mem_hdr_t *req, drctl_rsrc_t *rsrc, int nrsrc) * on the memory allocated for the message buffer * itself. */ - if (rsrc[idx].offset != NULL) { + if (rsrc[idx].offset != 0) { err_str = (char *)rsrc + rsrc[idx].offset; err_len = strlen(err_str) + 1; @@ -768,7 +768,7 @@ dr_mem_list_query(dr_mem_hdr_t *req, dr_mem_hdr_t **resp, int *resp_len) /* allocate a response message, should be freed by caller */ nml = 0; rlen = sizeof (dr_mem_hdr_t); - if (req_mblks->addr == NULL && req_mblks->size == 0) { + if (req_mblks->addr == 0 && req_mblks->size == 0) { /* * Request is for domain's full view of it's memory. * place a copy in phys_copy then release the memlist lock. @@ -926,8 +926,8 @@ dr_mem_unconfigure(dr_mem_blk_t *mbp, int *status) if (!MBLK_IS_VALID(mbp)) { DR_DBG_MEM("invalid mblk 0x%lx.0x%lx\n", mbp->addr, mbp->size); - *status = DR_MEM_STAT_CONFIGURED; - rv = DR_MEM_RES_EINVAL; + *status = DR_MEM_STAT_CONFIGURED; + rv = DR_MEM_RES_EINVAL; } else if (rv = mem_del(btop(mbp->addr), btop(mbp->size))) { *status = DR_MEM_STAT_CONFIGURED; } else { diff --git a/usr/src/uts/sun4v/io/drctl.c b/usr/src/uts/sun4v/io/drctl.c index 2fd20ddfee..c6c8deeefa 100644 --- a/usr/src/uts/sun4v/io/drctl.c +++ b/usr/src/uts/sun4v/io/drctl.c @@ -445,7 +445,7 @@ drctl_config_init(int cmd, int flags, drctl_rsrc_t *res, "reconfiguration daemon.\n"; static char drd_msg [] = "Cannot communicate with reconfiguration " "daemon (drd) in target domain.\n" - "drd(1M) SMF service may not be enabled.\n"; + "drd(8) SMF service may not be enabled.\n"; static char busy_msg [] = "Busy executing earlier command; " "please try again later.\n"; size_t rq_size; diff --git a/usr/src/uts/sun4v/io/drctl_impl.c b/usr/src/uts/sun4v/io/drctl_impl.c index 4f9c71f943..45a3fdf5b1 100644 --- a/usr/src/uts/sun4v/io/drctl_impl.c +++ b/usr/src/uts/sun4v/io/drctl_impl.c @@ -124,7 +124,7 @@ retry: switch (up_err) { case EINTR: DR_DBG_CTL("%s: door call returned EINTR\n", me); - _NOTE(FALLTHROUGH) + /* FALLTHROUGH */ case EAGAIN: /* * Server process may be forking, try again. diff --git a/usr/src/uts/sun4v/io/ds_common.c b/usr/src/uts/sun4v/io/ds_common.c index 54876ac3bc..fad3014d2b 100644 --- a/usr/src/uts/sun4v/io/ds_common.c +++ b/usr/src/uts/sun4v/io/ds_common.c @@ -431,7 +431,7 @@ ds_ldc_fini(ds_port_t *port) } port->ldc.id = (uint64_t)-1; - port->ldc.hdl = NULL; + port->ldc.hdl = 0; port->ldc.state = 0; return (rv); @@ -2492,7 +2492,7 @@ ds_ucap_init(ds_capability_t *cap, ds_clnt_ops_t *ops, uint32_t flags, ds_vers_check_t status; ds_svc_t *svc; int rv = 0; - ds_svc_hdl_t lb_hdl, hdl; + ds_svc_hdl_t lb_hdl, hdl; int is_loopback; int is_client; diff --git a/usr/src/uts/sun4v/io/ds_drv.c b/usr/src/uts/sun4v/io/ds_drv.c index 2b2ba29e52..0c54cfa794 100644 --- a/usr/src/uts/sun4v/io/ds_drv.c +++ b/usr/src/uts/sun4v/io/ds_drv.c @@ -55,27 +55,6 @@ #include <sys/ds_impl.h> /* - * All DS ports in the system - * - * The list of DS ports is read in from the MD when the DS module is - * initialized and is never modified. This eliminates the need for - * locking to access the port array itself. Access to the individual - * ports are synchronized at the port level. - */ -ds_port_t ds_ports[DS_MAX_PORTS]; -ds_portset_t ds_allports; /* all DS ports in the system */ - -/* - * Table of registered services - * - * Locking: Accesses to the table of services are synchronized using - * a mutex lock. The reader lock must be held when looking up service - * information in the table. The writer lock must be held when any - * service information is being modified. - */ -ds_svcs_t ds_svcs; - -/* * Taskq for internal task processing */ static taskq_t *ds_taskq; @@ -493,8 +472,6 @@ static ds_log_entry_t ds_log_entry_pool[DS_LOG_NPOOL]; static void ds_log_init(void) { - ds_log_entry_t *new; - /* initialize global lock */ mutex_init(&ds_log.lock, NULL, MUTEX_DRIVER, NULL); @@ -506,9 +483,9 @@ ds_log_init(void) ds_log.nentry = 0; /* initialize the free list */ - for (new = ds_log_entry_pool; new < DS_LOG_POOL_END; new++) { - new->next = ds_log.freelist; - ds_log.freelist = new; + for (int i = 0; i < DS_LOG_NPOOL; i++) { + ds_log_entry_pool[i].next = ds_log.freelist; + ds_log.freelist = &ds_log_entry_pool[i]; } mutex_exit(&ds_log.lock); diff --git a/usr/src/uts/sun4v/io/ds_pri_hcall.s b/usr/src/uts/sun4v/io/ds_pri_hcall.s index b02a9aa614..05923e80cd 100644 --- a/usr/src/uts/sun4v/io/ds_pri_hcall.s +++ b/usr/src/uts/sun4v/io/ds_pri_hcall.s @@ -31,15 +31,6 @@ #include <sys/asm_linkage.h> #include <sys/hypervisor_api.h> -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -hv_mach_pri(uint64_t buffer_ra, uint64_t *buffer_sizep) -{ return (0); } - -#else /* lint || __lint */ - /* * MACH_PRI * arg0 buffer real address @@ -56,4 +47,3 @@ hv_mach_pri(uint64_t buffer_ra, uint64_t *buffer_sizep) stx %o1, [%o4] SET_SIZE(hv_mach_pri) -#endif /* lint || __lint */ diff --git a/usr/src/uts/sun4v/io/fpc/fpc-asm-4v.s b/usr/src/uts/sun4v/io/fpc/fpc-asm-4v.s index 7a2d3d6743..c0f497ea8e 100644 --- a/usr/src/uts/sun4v/io/fpc/fpc-asm-4v.s +++ b/usr/src/uts/sun4v/io/fpc/fpc-asm-4v.s @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Assembly language support for sun4v px driver */ @@ -38,22 +36,6 @@ /*LINTLIBRARY*/ -#if defined(lint) - -#include "fpc-impl-4v.h" - -/*ARGSUSED*/ -int -fpc_get_fire_perfreg(devhandle_t dev_hdl, int regid, uint64_t *data) -{ return (0); } - -/*ARGSUSED*/ -int -fpc_set_fire_perfreg(devhandle_t dev_hdl, int regid, uint64_t data) -{ return (0); } - -#else /* lint */ - /* * fpc_get_fire_perfreg(devhandle_t dev_hdl, int regid, uint64_t *data) */ @@ -77,4 +59,3 @@ fpc_set_fire_perfreg(devhandle_t dev_hdl, int regid, uint64_t data) SET_SIZE(fpc_set_fire_perfreg) -#endif diff --git a/usr/src/uts/sun4v/io/glvc/glvc.c b/usr/src/uts/sun4v/io/glvc/glvc.c index 8c151416aa..77dd8c60f3 100644 --- a/usr/src/uts/sun4v/io/glvc/glvc.c +++ b/usr/src/uts/sun4v/io/glvc/glvc.c @@ -254,7 +254,7 @@ glvc_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) { int instance; int err; - glvc_soft_state_t *softsp; + glvc_soft_state_t *softsp; switch (cmd) { case DDI_ATTACH: @@ -338,7 +338,7 @@ glvc_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) va_to_pa((caddr_t)softsp->mb_send_buf); err = ddi_create_minor_node(dip, "glvc", S_IFCHR, - instance, DDI_PSEUDO, NULL); + instance, DDI_PSEUDO, 0); if (err != DDI_SUCCESS) { kmem_free(softsp->mb_recv_buf, softsp->mtu); kmem_free(softsp->mb_send_buf, softsp->mtu); @@ -412,7 +412,7 @@ glvc_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) { int instance; int err; - glvc_soft_state_t *softsp; + glvc_soft_state_t *softsp; switch (cmd) { diff --git a/usr/src/uts/sun4v/io/glvc/glvc_hcall.s b/usr/src/uts/sun4v/io/glvc/glvc_hcall.s index e3717f245c..959b5fe34e 100644 --- a/usr/src/uts/sun4v/io/glvc/glvc_hcall.s +++ b/usr/src/uts/sun4v/io/glvc/glvc_hcall.s @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Hypervisor calls called by glvc driver. */ @@ -33,37 +31,6 @@ #include <sys/hypervisor_api.h> #include <sys/glvc.h> -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -hv_service_recv(uint64_t s_id, uint64_t buf_pa, uint64_t size, - uint64_t *recv_bytes) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_service_send(uint64_t s_id, uint64_t buf_pa, uint64_t size, - uint64_t *send_bytes) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_service_getstatus(uint64_t s_id, uint64_t *vreg) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_service_setstatus(uint64_t s_id, uint64_t bits) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_service_clrstatus(uint64_t s_id, uint64_t bits) -{ return (0); } - -#else /* lint || __lint */ - /* * hv_service_recv(uint64_t s_id, uint64_t buf_pa, * uint64_t size, uint64_t *recv_bytes); @@ -138,4 +105,3 @@ hv_service_clrstatus(uint64_t s_id, uint64_t bits) nop SET_SIZE(hv_service_clrstatus) -#endif /* lint || __lint */ diff --git a/usr/src/uts/sun4v/io/iospc/iospc.c b/usr/src/uts/sun4v/io/iospc/iospc.c index 47efae480c..8ca72c2539 100644 --- a/usr/src/uts/sun4v/io/iospc/iospc.c +++ b/usr/src/uts/sun4v/io/iospc/iospc.c @@ -377,7 +377,7 @@ iospc_create_picN_kstat(char *mod_name, int pic, uint64_t ev_offset, (void) snprintf(pic_name, PIC_STR_LEN, "pic%1d", pic); if ((picN_ksp = kstat_create(mod_name, 0, pic_name, - "bus", KSTAT_TYPE_NAMED, num_ev, NULL)) == NULL) { + "bus", KSTAT_TYPE_NAMED, num_ev, 0)) == NULL) { return (NULL); } @@ -467,7 +467,7 @@ iospc_create_cntr_kstat(char *name, int dev_inst, */ static int iospc_perfcnt_program(iospc_t *iospc_p, iospc_grp_t *grp_p, - iospc_ksinfo_t *ksinfo_p, uint64_t new_events) + iospc_ksinfo_t *ksinfo_p, uint64_t new_events) { uint64_t old_events; int rval = SUCCESS; diff --git a/usr/src/uts/sun4v/io/iospc/rfios_asm.s b/usr/src/uts/sun4v/io/iospc/rfios_asm.s index c507e9f053..4c567c08fd 100644 --- a/usr/src/uts/sun4v/io/iospc/rfios_asm.s +++ b/usr/src/uts/sun4v/io/iospc/rfios_asm.s @@ -34,20 +34,6 @@ /*LINTLIBRARY*/ -#if defined(lint) - -/*ARGSUSED*/ -int -rfiospc_get_perfreg(cntr_handle_t handle, int regid, uint64_t *data) -{ return (0); } - -/*ARGSUSED*/ -int -rfiospc_set_perfreg(cntr_handle_t handle, int regid, uint64_t data) -{ return (0); } - -#else /* lint */ - ENTRY(rfiospc_get_perfreg) mov RFIOS_GET_PERFREG, %o5 ta FAST_TRAP @@ -64,4 +50,3 @@ rfiospc_set_perfreg(cntr_handle_t handle, int regid, uint64_t data) nop SET_SIZE(rfiospc_set_perfreg) -#endif diff --git a/usr/src/uts/sun4v/io/ldc.c b/usr/src/uts/sun4v/io/ldc.c index 939c260834..0b2b94d173 100644 --- a/usr/src/uts/sun4v/io/ldc.c +++ b/usr/src/uts/sun4v/io/ldc.c @@ -288,18 +288,6 @@ ldc_inject_error(ldc_chan_t *ldcp, uint64_t error) return (B_TRUE); } -#define D1 \ -if (ldcdbg & 0x01) \ - ldcdebug - -#define D2 \ -if (ldcdbg & 0x02) \ - ldcdebug - -#define DWARN \ -if (ldcdbg & 0x04) \ - ldcdebug - #define DUMP_PAYLOAD(id, addr) \ { \ char buf[65*3]; \ @@ -321,10 +309,10 @@ if (ldcdbg & 0x04) \ (msg->env & LDC_FRAG_START) ? 'B' : ' ', \ (msg->env & LDC_FRAG_STOP) ? 'E' : ' ', \ (msg->env & LDC_LEN_MASK)); \ - } else { \ + } else { \ D2((c)->id, "%s: msg%d (/%x/%x/%x/,env=%x)", (s), \ mid, msg->type, msg->stype, msg->ctrl, msg->env); \ - } \ + } \ } #define LDC_INJECT_RESET(_ldcp) ldc_inject_error(_ldcp, LDC_ERR_RESET) @@ -337,10 +325,6 @@ extern void i_ldc_mem_inject_dring_clear(ldc_chan_t *ldcp); #define DBG_ALL_LDCS -1 -#define D1 -#define D2 -#define DWARN - #define DUMP_PAYLOAD(id, addr) #define DUMP_LDC_PKT(c, s, addr) @@ -461,10 +445,10 @@ _info(struct modinfo *modinfop) int _fini(void) { - int rv, status; - ldc_chan_t *tmp_ldcp, *ldcp; - ldc_dring_t *tmp_dringp, *dringp; - ldc_mem_info_t minfo; + int rv, status; + ldc_chan_t *tmp_ldcp, *ldcp; + ldc_dring_t *tmp_dringp, *dringp; + ldc_mem_info_t minfo; /* Unlink the driver module from the system */ status = mod_remove(&ml); @@ -564,7 +548,7 @@ i_ldc_h2v_error(int h_error) case H_ENOTSUPPORTED: return (ENOTSUP); - case H_ETOOMANY: + case H_ETOOMANY: return (ENOSPC); case H_ECHANNEL: @@ -809,8 +793,8 @@ i_ldc_clear_intr(ldc_chan_t *ldcp, cnex_intrtype_t itype) static int i_ldc_set_rx_head(ldc_chan_t *ldcp, uint64_t head) { - int rv; - int retries; + int rv; + int retries; ASSERT(MUTEX_HELD(&ldcp->lock)); for (retries = 0; retries < ldc_max_retries; retries++) { @@ -840,7 +824,7 @@ i_ldc_set_rx_head(ldc_chan_t *ldcp, uint64_t head) static void i_ldc_get_tx_head(ldc_chan_t *ldcp, uint64_t *head) { - ldc_msg_t *pkt; + ldc_msg_t *pkt; ASSERT(MUTEX_HELD(&ldcp->tx_lock)); @@ -876,8 +860,8 @@ i_ldc_get_tx_head(ldc_chan_t *ldcp, uint64_t *head) static int i_ldc_get_tx_tail(ldc_chan_t *ldcp, uint64_t *tail) { - int rv; - uint64_t current_head, new_tail; + int rv; + uint64_t current_head, new_tail; ASSERT(MUTEX_HELD(&ldcp->tx_lock)); /* Read the head and tail ptrs from HV */ @@ -924,7 +908,7 @@ static int i_ldc_set_tx_tail(ldc_chan_t *ldcp, uint64_t tail) { int rv, retval = EWOULDBLOCK; - int retries; + int retries; ASSERT(MUTEX_HELD(&ldcp->tx_lock)); for (retries = 0; retries < ldc_max_retries; retries++) { @@ -1131,7 +1115,7 @@ i_ldc_send_pkt(ldc_chan_t *ldcp, uint8_t pkttype, uint8_t subtype, uint8_t ctrlmsg) { int rv; - ldc_msg_t *pkt; + ldc_msg_t *pkt; uint64_t tx_tail; uint32_t curr_seqid; @@ -1236,8 +1220,8 @@ i_ldc_check_seqid(ldc_chan_t *ldcp, ldc_msg_t *msg) static int i_ldc_process_VER(ldc_chan_t *ldcp, ldc_msg_t *msg) { - int rv = 0, idx = ldcp->next_vidx; - ldc_msg_t *pkt; + int rv = 0, idx = ldcp->next_vidx; + ldc_msg_t *pkt; uint64_t tx_tail; ldc_ver_t *rcvd_ver; @@ -1533,8 +1517,8 @@ i_ldc_process_VER(ldc_chan_t *ldcp, ldc_msg_t *msg) static int i_ldc_process_RTS(ldc_chan_t *ldcp, ldc_msg_t *msg) { - int rv = 0; - ldc_msg_t *pkt; + int rv = 0; + ldc_msg_t *pkt; uint64_t tx_tail; boolean_t sent_NACK = B_FALSE; @@ -1660,7 +1644,7 @@ i_ldc_process_RTS(ldc_chan_t *ldcp, ldc_msg_t *msg) static int i_ldc_process_RTR(ldc_chan_t *ldcp, ldc_msg_t *msg) { - int rv = 0; + int rv = 0; boolean_t sent_NACK = B_FALSE; D2(ldcp->id, "i_ldc_process_RTR: (0x%llx) received RTR\n", ldcp->id); @@ -1824,7 +1808,7 @@ static int i_ldc_process_data_ACK(ldc_chan_t *ldcp, ldc_msg_t *msg) { int rv; - uint64_t tx_head; + uint64_t tx_head; ldc_msg_t *pkt; /* Obtain Tx lock */ @@ -1892,7 +1876,7 @@ i_ldc_process_data_ACK(ldc_chan_t *ldcp, ldc_msg_t *msg) static int i_ldc_ctrlmsg(ldc_chan_t *ldcp, ldc_msg_t *msg) { - int rv = 0; + int rv = 0; D1(ldcp->id, "i_ldc_ctrlmsg: (%llx) tstate = %lx, hstate = %lx\n", ldcp->id, ldcp->tstate, ldcp->hstate); @@ -2102,9 +2086,9 @@ i_ldc_tx_hdlr(caddr_t arg1, caddr_t arg2) { _NOTE(ARGUNUSED(arg2)) - int rv; - ldc_chan_t *ldcp; - boolean_t notify_client = B_FALSE; + int rv; + ldc_chan_t *ldcp; + boolean_t notify_client = B_FALSE; uint64_t notify_event = 0, link_state; /* Get the channel for which interrupt was received */ @@ -2227,8 +2211,8 @@ i_ldc_rx_process_hvq(ldc_chan_t *ldcp, boolean_t *notify_client, uint64_t *notify_event) { int rv; - uint64_t rx_head, rx_tail; - ldc_msg_t *msg; + uint64_t rx_head, rx_tail; + ldc_msg_t *msg; uint64_t link_state, first_fragment = 0; boolean_t trace_length = B_TRUE; @@ -2580,7 +2564,7 @@ i_ldc_rx_ackpeek(ldc_chan_t *ldcp, uint64_t rx_head, uint64_t rx_tail) int ldc_init(uint64_t id, ldc_attr_t *attr, ldc_handle_t *handle) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; int rv, exit_val; uint64_t ra_base, nentries; uint64_t qlen; @@ -2728,7 +2712,7 @@ ldc_init(uint64_t id, ldc_attr_t *attr, ldc_handle_t *handle) /* Create a transmit queue */ ldcp->tx_q_va = (uint64_t) contig_mem_alloc(ldcp->tx_q_entries << LDC_PACKET_SHIFT); - if (ldcp->tx_q_va == NULL) { + if (ldcp->tx_q_va == 0) { cmn_err(CE_WARN, "ldc_init: (0x%lx) TX queue allocation failed\n", ldcp->id); @@ -2745,7 +2729,7 @@ ldc_init(uint64_t id, ldc_attr_t *attr, ldc_handle_t *handle) /* Create a receive queue */ ldcp->rx_q_va = (uint64_t) contig_mem_alloc(ldcp->rx_q_entries << LDC_PACKET_SHIFT); - if (ldcp->rx_q_va == NULL) { + if (ldcp->rx_q_va == 0) { cmn_err(CE_WARN, "ldc_init: (0x%lx) RX queue allocation failed\n", ldcp->id); @@ -2775,7 +2759,7 @@ ldc_init(uint64_t id, ldc_attr_t *attr, ldc_handle_t *handle) ldcp->rx_dq_va = (uint64_t) kmem_alloc(ldcp->rx_dq_entries << LDC_PACKET_SHIFT, KM_SLEEP); - if (ldcp->rx_dq_va == NULL) { + if (ldcp->rx_dq_va == 0) { cmn_err(CE_WARN, "ldc_init: (0x%lx) RX data queue " "allocation failed\n", ldcp->id); @@ -2831,8 +2815,7 @@ cleanup_on_exit: mutex_destroy(&ldcp->tx_lock); mutex_destroy(&ldcp->lock); - if (ldcp) - kmem_free(ldcp, sizeof (ldc_chan_t)); + kmem_free(ldcp, sizeof (ldc_chan_t)); return (exit_val); } @@ -2846,11 +2829,11 @@ cleanup_on_exit: int ldc_fini(ldc_handle_t handle) { - ldc_chan_t *ldcp; - ldc_chan_t *tmp_ldcp; - uint64_t id; + ldc_chan_t *ldcp; + ldc_chan_t *tmp_ldcp; + uint64_t id; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_fini: invalid channel handle\n"); return (EINVAL); } @@ -2895,7 +2878,7 @@ ldc_fini(ldc_handle_t handle) /* Free the map table for this channel */ if (ldcp->mtbl) { - (void) hv_ldc_set_map_table(ldcp->id, NULL, NULL); + (void) hv_ldc_set_map_table(ldcp->id, 0, 0); if (ldcp->mtbl->contigmem) contig_mem_free(ldcp->mtbl->table, ldcp->mtbl->size); else @@ -2951,10 +2934,10 @@ ldc_fini(ldc_handle_t handle) int ldc_open(ldc_handle_t handle) { - ldc_chan_t *ldcp; - int rv; + ldc_chan_t *ldcp; + int rv; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_open: invalid channel handle\n"); return (EINVAL); } @@ -2979,7 +2962,7 @@ ldc_open(ldc_handle_t handle) /* * Unregister/Register the tx queue with the hypervisor */ - rv = hv_ldc_tx_qconf(ldcp->id, NULL, NULL); + rv = hv_ldc_tx_qconf(ldcp->id, 0, 0); if (rv) { cmn_err(CE_WARN, "ldc_open: (0x%lx) channel tx queue unconf failed\n", @@ -3003,7 +2986,7 @@ ldc_open(ldc_handle_t handle) /* * Unregister/Register the rx queue with the hypervisor */ - rv = hv_ldc_rx_qconf(ldcp->id, NULL, NULL); + rv = hv_ldc_rx_qconf(ldcp->id, 0, 0); if (rv) { cmn_err(CE_WARN, "ldc_open: (0x%lx) channel rx queue unconf failed\n", @@ -3032,8 +3015,8 @@ ldc_open(ldc_handle_t handle) cmn_err(CE_WARN, "ldc_open: (0x%lx) channel register failed\n", ldcp->id); ldcp->tstate &= ~TS_QCONF_RDY; - (void) hv_ldc_tx_qconf(ldcp->id, NULL, NULL); - (void) hv_ldc_rx_qconf(ldcp->id, NULL, NULL); + (void) hv_ldc_tx_qconf(ldcp->id, 0, 0); + (void) hv_ldc_rx_qconf(ldcp->id, 0, 0); mutex_exit(&ldcp->lock); return (EIO); } @@ -3050,8 +3033,8 @@ ldc_open(ldc_handle_t handle) ldcp->id); (void) i_ldc_unregister_channel(ldcp); ldcp->tstate &= ~TS_QCONF_RDY; - (void) hv_ldc_tx_qconf(ldcp->id, NULL, NULL); - (void) hv_ldc_rx_qconf(ldcp->id, NULL, NULL); + (void) hv_ldc_tx_qconf(ldcp->id, 0, 0); + (void) hv_ldc_rx_qconf(ldcp->id, 0, 0); mutex_exit(&ldcp->lock); return (EIO); } @@ -3102,11 +3085,11 @@ ldc_open(ldc_handle_t handle) int ldc_close(ldc_handle_t handle) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; int rv = 0, retries = 0; boolean_t chk_done = B_FALSE; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_close: invalid channel handle\n"); return (EINVAL); } @@ -3230,7 +3213,7 @@ ldc_close(ldc_handle_t handle) /* * Unregister queues */ - rv = hv_ldc_tx_qconf(ldcp->id, NULL, NULL); + rv = hv_ldc_tx_qconf(ldcp->id, 0, 0); if (rv) { cmn_err(CE_WARN, "ldc_close: (0x%lx) channel TX queue unconf failed\n", @@ -3239,7 +3222,7 @@ ldc_close(ldc_handle_t handle) mutex_exit(&ldcp->lock); return (EIO); } - rv = hv_ldc_rx_qconf(ldcp->id, NULL, NULL); + rv = hv_ldc_rx_qconf(ldcp->id, 0, 0); if (rv) { cmn_err(CE_WARN, "ldc_close: (0x%lx) channel RX queue unconf failed\n", @@ -3280,7 +3263,7 @@ ldc_reg_callback(ldc_handle_t handle, { ldc_chan_t *ldcp; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_reg_callback: invalid channel handle\n"); return (EINVAL); @@ -3327,7 +3310,7 @@ ldc_unreg_callback(ldc_handle_t handle) { ldc_chan_t *ldcp; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_unreg_callback: invalid channel handle\n"); return (EINVAL); @@ -3373,12 +3356,12 @@ ldc_unreg_callback(ldc_handle_t handle) int ldc_up(ldc_handle_t handle) { - int rv; - ldc_chan_t *ldcp; - ldc_msg_t *ldcmsg; - uint64_t tx_tail, tstate, link_state; + int rv; + ldc_chan_t *ldcp; + ldc_msg_t *ldcmsg; + uint64_t tx_tail, tstate, link_state; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_up: invalid channel handle\n"); return (EINVAL); } @@ -3515,9 +3498,9 @@ ldc_up(ldc_handle_t handle) int ldc_down(ldc_handle_t handle) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_down: invalid channel handle\n"); return (EINVAL); } @@ -3539,7 +3522,7 @@ ldc_status(ldc_handle_t handle, ldc_status_t *status) { ldc_chan_t *ldcp; - if (handle == NULL || status == NULL) { + if (handle == 0 || status == NULL) { DWARN(DBG_ALL_LDCS, "ldc_status: invalid argument\n"); return (EINVAL); } @@ -3559,9 +3542,9 @@ ldc_status(ldc_handle_t handle, ldc_status_t *status) int ldc_set_cb_mode(ldc_handle_t handle, ldc_cb_mode_t cmode) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_set_intr_mode: invalid channel handle\n"); return (EINVAL); @@ -3613,11 +3596,11 @@ ldc_set_cb_mode(ldc_handle_t handle, ldc_cb_mode_t cmode) int ldc_chkq(ldc_handle_t handle, boolean_t *hasdata) { - int rv; - uint64_t rx_head, rx_tail; - ldc_chan_t *ldcp; + int rv; + uint64_t rx_head, rx_tail; + ldc_chan_t *ldcp; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_chkq: invalid channel handle\n"); return (EINVAL); } @@ -3720,11 +3703,11 @@ ldc_chkq(ldc_handle_t handle, boolean_t *hasdata) int ldc_read(ldc_handle_t handle, caddr_t bufp, size_t *sizep) { - ldc_chan_t *ldcp; - uint64_t rx_head = 0, rx_tail = 0; + ldc_chan_t *ldcp; + uint64_t rx_head = 0, rx_tail = 0; int rv = 0, exit_val; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_read: invalid channel handle\n"); return (EINVAL); } @@ -3809,11 +3792,11 @@ ldc_read(ldc_handle_t handle, caddr_t bufp, size_t *sizep) static int i_ldc_read_raw(ldc_chan_t *ldcp, caddr_t target_bufp, size_t *sizep) { - uint64_t q_size_mask; - ldc_msg_t *msgp; + uint64_t q_size_mask; + ldc_msg_t *msgp; uint8_t *msgbufp; int rv = 0, space; - uint64_t rx_head, rx_tail; + uint64_t rx_head, rx_tail; space = *sizep; @@ -3885,13 +3868,13 @@ static int i_ldc_read_packet(ldc_chan_t *ldcp, caddr_t target_bufp, size_t *sizep) { int rv = 0; - uint64_t rx_head = 0, rx_tail = 0; - uint64_t curr_head = 0; - ldc_msg_t *msg; - caddr_t target; - size_t len = 0, bytes_read = 0; - int retries = 0; - uint64_t q_va, q_size_mask; + uint64_t rx_head = 0, rx_tail = 0; + uint64_t curr_head = 0; + ldc_msg_t *msg; + caddr_t target; + size_t len = 0, bytes_read = 0; + int retries = 0; + uint64_t q_va, q_size_mask; uint64_t first_fragment = 0; target = target_bufp; @@ -4286,7 +4269,7 @@ ldc_write(ldc_handle_t handle, caddr_t buf, size_t *sizep) ldc_chan_t *ldcp; int rv = 0; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_write: invalid channel handle\n"); return (EINVAL); } @@ -4332,8 +4315,8 @@ ldc_write(ldc_handle_t handle, caddr_t buf, size_t *sizep) static int i_ldc_write_raw(ldc_chan_t *ldcp, caddr_t buf, size_t *sizep) { - ldc_msg_t *ldcmsg; - uint64_t tx_head, tx_tail, new_tail; + ldc_msg_t *ldcmsg; + uint64_t tx_head, tx_tail, new_tail; int rv = 0; size_t size; @@ -4463,11 +4446,11 @@ i_ldc_write_raw(ldc_chan_t *ldcp, caddr_t buf, size_t *sizep) static int i_ldc_write_packet(ldc_chan_t *ldcp, caddr_t buf, size_t *size) { - ldc_msg_t *ldcmsg; - uint64_t tx_head, tx_tail, new_tail, start; + ldc_msg_t *ldcmsg; + uint64_t tx_head, tx_tail, new_tail, start; uint64_t txq_size_mask, numavail; - uint8_t *msgbuf, *source = (uint8_t *)buf; - size_t len, bytes_written = 0, remaining; + uint8_t *msgbuf, *source = (uint8_t *)buf; + size_t len, bytes_written = 0, remaining; int rv; uint32_t curr_seqid; @@ -4735,7 +4718,7 @@ ldc_info(ldc_handle_t handle, ldc_info_t *info) ldc_chan_t *ldcp; uint64_t avail; - if (handle == NULL || info == NULL) { + if (handle == 0 || info == NULL) { DWARN(DBG_ALL_LDCS, "ldc_get_info: invalid args\n"); return (EINVAL); } diff --git a/usr/src/uts/sun4v/io/ldc_shm.c b/usr/src/uts/sun4v/io/ldc_shm.c index f35bcdb7f0..f8edd4f845 100644 --- a/usr/src/uts/sun4v/io/ldc_shm.c +++ b/usr/src/uts/sun4v/io/ldc_shm.c @@ -191,10 +191,10 @@ i_ldc_init_mapin(ldc_soft_state_t *ldcssp, uint64_t major, uint64_t minor) int ldc_mem_alloc_handle(ldc_handle_t handle, ldc_mem_handle_t *mhandle) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_mhdl_t *mhdl; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_alloc_handle: invalid channel handle\n"); return (EINVAL); @@ -250,10 +250,10 @@ ldc_mem_alloc_handle(ldc_handle_t handle, ldc_mem_handle_t *mhandle) int ldc_mem_free_handle(ldc_mem_handle_t mhandle) { - ldc_mhdl_t *mhdl, *phdl; - ldc_chan_t *ldcp; + ldc_mhdl_t *mhdl, *phdl; + ldc_chan_t *ldcp; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_free_handle: invalid memory handle\n"); return (EINVAL); @@ -346,7 +346,7 @@ i_ldc_mem_bind_handle(ldc_mem_handle_t mhandle, caddr_t vaddr, size_t len, uint8_t mtype, uint8_t perm, ldc_mem_cookie_t *cookie, uint32_t *ccount) { ldc_mhdl_t *mhdl; - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_mtbl_t *mtbl; ldc_memseg_t *memseg; ldc_mte_t tmp_mte; @@ -357,9 +357,9 @@ i_ldc_mem_bind_handle(ldc_mem_handle_t mhandle, caddr_t vaddr, size_t len, uint64_t pg_shift, pg_size, pg_size_code, pg_mask; pgcnt_t npages; caddr_t v_align, addr; - int i, rv; + int i, rv; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_bind_handle: invalid memory handle\n"); return (EINVAL); @@ -400,7 +400,7 @@ i_ldc_mem_bind_handle(ldc_mem_handle_t mhandle, caddr_t vaddr, size_t len, mtbl = kmem_zalloc(sizeof (ldc_mtbl_t), KM_SLEEP); mtbl->num_entries = mtbl->num_avail = ldc_maptable_entries; mtbl->size = ldc_maptable_entries * sizeof (ldc_mte_slot_t); - mtbl->next_entry = NULL; + mtbl->next_entry = 0; mtbl->contigmem = B_TRUE; /* Allocate the table itself */ @@ -671,10 +671,10 @@ int ldc_mem_nextcookie(ldc_mem_handle_t mhandle, ldc_mem_cookie_t *cookie) { ldc_mhdl_t *mhdl; - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_memseg_t *memseg; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_nextcookie: invalid memory handle\n"); return (EINVAL); @@ -727,14 +727,14 @@ int ldc_mem_unbind_handle(ldc_mem_handle_t mhandle) { ldc_mhdl_t *mhdl; - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_mtbl_t *mtbl; ldc_memseg_t *memseg; uint64_t cookie_addr; uint64_t pg_shift, pg_size_code; int i, rv, retries; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_unbind_handle: invalid memory handle\n"); return (EINVAL); @@ -827,7 +827,7 @@ ldc_mem_info(ldc_mem_handle_t mhandle, ldc_mem_info_t *minfo) { ldc_mhdl_t *mhdl; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_info: invalid memory handle\n"); return (EINVAL); } @@ -862,20 +862,20 @@ int ldc_mem_copy(ldc_handle_t handle, caddr_t vaddr, uint64_t off, size_t *size, ldc_mem_cookie_t *cookies, uint32_t ccount, uint8_t direction) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; uint64_t local_voff, local_valign; uint64_t cookie_addr, cookie_size; uint64_t pg_shift, pg_size, pg_size_code; - uint64_t export_caddr, export_poff, export_psize, export_size; + uint64_t export_caddr, export_poff, export_psize, export_size; uint64_t local_ra, local_poff, local_psize; uint64_t copy_size, copied_len = 0, total_bal = 0, idx = 0; pgcnt_t npages; size_t len = *size; - int i, rv = 0; + int i, rv = 0; uint64_t chid; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_copy: invalid channel handle\n"); return (EINVAL); } @@ -984,7 +984,7 @@ ldc_mem_copy(ldc_handle_t handle, caddr_t vaddr, uint64_t off, size_t *size, copy_size, &copied_len); if (rv != 0) { - int error = EIO; + int error = EIO; uint64_t rx_hd, rx_tl; DWARN(chid, @@ -1088,17 +1088,17 @@ int ldc_mem_rdwr_cookie(ldc_handle_t handle, caddr_t vaddr, size_t *size, caddr_t paddr, uint8_t direction) { - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; uint64_t local_voff, local_valign; uint64_t pg_shift, pg_size, pg_size_code; - uint64_t target_pa, target_poff, target_psize, target_size; + uint64_t target_pa, target_poff, target_psize, target_size; uint64_t local_ra, local_poff, local_psize; uint64_t copy_size, copied_len = 0; pgcnt_t npages; size_t len = *size; - int rv = 0; + int rv = 0; - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_rdwr_cookie: invalid channel handle\n"); return (EINVAL); @@ -1259,7 +1259,7 @@ i_ldc_mem_map(ldc_mem_handle_t mhandle, ldc_mem_cookie_t *cookie, { int i, j, idx, rv, retries; - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_mhdl_t *mhdl; ldc_memseg_t *memseg; caddr_t tmpaddr; @@ -1269,7 +1269,7 @@ i_ldc_mem_map(ldc_mem_handle_t mhandle, ldc_mem_cookie_t *cookie, uint64_t cookie_addr, cookie_off, cookie_size; tte_t ldc_tte; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_map: invalid memory handle\n"); return (EINVAL); } @@ -1519,7 +1519,7 @@ ldc_mem_unmap(ldc_mem_handle_t mhandle) { int i, rv; ldc_mhdl_t *mhdl = (ldc_mhdl_t *)mhandle; - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_memseg_t *memseg; if (mhdl == 0 || mhdl->status != LDC_MAPPED) { @@ -1586,14 +1586,14 @@ static int i_ldc_mem_acquire_release(ldc_mem_handle_t mhandle, uint8_t direction, uint64_t offset, size_t size) { - int err; + int err; ldc_mhdl_t *mhdl; ldc_chan_t *ldcp; ldc_memseg_t *memseg; caddr_t local_vaddr; size_t copy_size; - if (mhandle == NULL) { + if (mhandle == 0) { DWARN(DBG_ALL_LDCS, "i_ldc_mem_acquire_release: invalid memory handle\n"); return (EINVAL); @@ -1691,7 +1691,7 @@ ldc_mem_dring_create(uint32_t len, uint32_t dsize, ldc_dring_handle_t *dhandle) D1(DBG_ALL_LDCS, "ldc_mem_dring_create: len=0x%x, size=0x%x\n", len, dsize); - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_create: invalid dhandle\n"); return (EINVAL); } @@ -1754,7 +1754,7 @@ ldc_mem_dring_destroy(ldc_dring_handle_t dhandle) D1(DBG_ALL_LDCS, "ldc_mem_dring_destroy: entered\n"); - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_destroy: invalid desc ring handle\n"); return (EINVAL); @@ -1822,19 +1822,19 @@ ldc_mem_dring_bind(ldc_handle_t handle, ldc_dring_handle_t dhandle, uint8_t mtype, uint8_t perm, ldc_mem_cookie_t *cookie, uint32_t *ccount) { int err; - ldc_chan_t *ldcp; + ldc_chan_t *ldcp; ldc_dring_t *dringp; ldc_mem_handle_t mhandle; /* check to see if channel is initalized */ - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_bind: invalid channel handle\n"); return (EINVAL); } ldcp = (ldc_chan_t *)handle; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_bind: invalid desc ring handle\n"); return (EINVAL); @@ -1885,7 +1885,7 @@ ldc_mem_dring_bind(ldc_handle_t handle, ldc_dring_handle_t dhandle, /* create an memory handle */ err = ldc_mem_alloc_handle(handle, &mhandle); - if (err || mhandle == NULL) { + if (err || mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_bind: (0x%llx) error allocating mhandle\n", ldcp->id); @@ -1914,7 +1914,7 @@ ldc_mem_dring_bind(ldc_handle_t handle, ldc_dring_handle_t dhandle, (void) ldc_mem_free_handle(mhandle); dringp->ldcp = NULL; - dringp->mhdl = NULL; + dringp->mhdl = 0; *ccount = 0; mutex_exit(&dringp->lock); @@ -1941,10 +1941,10 @@ int ldc_mem_dring_nextcookie(ldc_dring_handle_t dhandle, ldc_mem_cookie_t *cookie) { int rv = 0; - ldc_dring_t *dringp; + ldc_dring_t *dringp; ldc_chan_t *ldcp; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_nextcookie: invalid desc ring handle\n"); return (EINVAL); @@ -1982,11 +1982,11 @@ ldc_mem_dring_nextcookie(ldc_dring_handle_t dhandle, ldc_mem_cookie_t *cookie) int ldc_mem_dring_unbind(ldc_dring_handle_t dhandle) { - ldc_dring_t *dringp; + ldc_dring_t *dringp; ldc_dring_t *tmp_dringp; ldc_chan_t *ldcp; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_unbind: invalid desc ring handle\n"); return (EINVAL); @@ -2035,7 +2035,7 @@ ldc_mem_dring_unbind(ldc_dring_handle_t dhandle) (void) ldc_mem_free_handle((ldc_mem_handle_t)dringp->mhdl); dringp->ldcp = NULL; - dringp->mhdl = NULL; + dringp->mhdl = 0; dringp->status = LDC_UNBOUND; mutex_exit(&dringp->lock); @@ -2124,7 +2124,7 @@ ldc_mem_dring_info(ldc_dring_handle_t dhandle, ldc_mem_info_t *minfo) ldc_dring_t *dringp; int rv; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_info: invalid desc ring handle\n"); return (EINVAL); @@ -2143,7 +2143,7 @@ ldc_mem_dring_info(ldc_dring_handle_t dhandle, ldc_mem_info_t *minfo) } } else { minfo->vaddr = dringp->base; - minfo->raddr = NULL; + minfo->raddr = 0; minfo->status = dringp->status; } @@ -2164,19 +2164,19 @@ ldc_mem_dring_map(ldc_handle_t handle, ldc_mem_cookie_t *cookie, ldc_dring_handle_t *dhandle) { int err; - ldc_chan_t *ldcp = (ldc_chan_t *)handle; + ldc_chan_t *ldcp = (ldc_chan_t *)handle; ldc_mem_handle_t mhandle; ldc_dring_t *dringp; size_t dring_size; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_map: invalid dhandle\n"); return (EINVAL); } /* check to see if channel is initalized */ - if (handle == NULL) { + if (handle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_map: invalid channel handle\n"); return (EINVAL); @@ -2234,7 +2234,7 @@ ldc_mem_dring_map(ldc_handle_t handle, ldc_mem_cookie_t *cookie, /* create an memory handle */ err = ldc_mem_alloc_handle(handle, &mhandle); - if (err || mhandle == NULL) { + if (err || mhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_map: cannot alloc hdl err=%d\n", err); @@ -2278,11 +2278,11 @@ ldc_mem_dring_map(ldc_handle_t handle, ldc_mem_cookie_t *cookie, int ldc_mem_dring_unmap(ldc_dring_handle_t dhandle) { - ldc_dring_t *dringp; + ldc_dring_t *dringp; ldc_dring_t *tmp_dringp; ldc_chan_t *ldcp; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "ldc_mem_dring_unmap: invalid desc ring handle\n"); return (EINVAL); @@ -2356,14 +2356,14 @@ static int i_ldc_dring_acquire_release(ldc_dring_handle_t dhandle, uint8_t direction, uint64_t start, uint64_t end) { - int err; + int err; ldc_dring_t *dringp; ldc_chan_t *ldcp; ldc_mhdl_t *mhdl; uint64_t soff; size_t copy_size; - if (dhandle == NULL) { + if (dhandle == 0) { DWARN(DBG_ALL_LDCS, "i_ldc_dring_acquire_release: invalid desc ring handle\n"); return (EINVAL); diff --git a/usr/src/uts/sun4v/io/mdeg.c b/usr/src/uts/sun4v/io/mdeg.c index 18441c2e3c..687ace384b 100644 --- a/usr/src/uts/sun4v/io/mdeg.c +++ b/usr/src/uts/sun4v/io/mdeg.c @@ -67,7 +67,7 @@ typedef struct mdeg_clnt { * held when modifying any client information. */ static struct mdeg { - taskq_t *taskq; /* for internal processing */ + taskq_t *taskq; /* for internal processing */ boolean_t enabled; /* enable/disable taskq processing */ kmutex_t lock; /* synchronize MD updates */ md_t *md_prev; /* previous MD */ @@ -94,8 +94,8 @@ static void mdeg_dump_table(void); #else /* DEBUG */ #define MDEG_DBG _NOTE(CONSTCOND) if (0) printf -#define MDEG_DUMP_CLNT -#define MDEG_DUMP_TABLE() +#define MDEG_DUMP_CLNT(...) +#define MDEG_DUMP_TABLE(...) #endif /* DEBUG */ @@ -334,7 +334,7 @@ mdeg_notify_client_reg(mdeg_clnt_t *clnt) */ if (clnt->pspec == NULL) { /* call the client callback */ - (*clnt->cb)(clnt->cb_arg, NULL); + (void) (*clnt->cb)(clnt->cb_arg, NULL); goto done; } @@ -387,7 +387,7 @@ mdeg_notify_client_reg(mdeg_clnt_t *clnt) mdeg_res->added.nelem = nnodes; /* call the client callback */ - (*clnt->cb)(clnt->cb_arg, mdeg_res); + (void) (*clnt->cb)(clnt->cb_arg, mdeg_res); done: mutex_exit(&mdeg.lock); @@ -602,7 +602,7 @@ mdeg_notify_client(void *arg) */ if (clnt->pspec == NULL) { /* call the client callback */ - (*clnt->cb)(clnt->cb_arg, NULL); + (void) (*clnt->cb)(clnt->cb_arg, NULL); MDEG_DBG("MDEG client callback done\n"); goto cleanup; @@ -634,7 +634,7 @@ mdeg_notify_client(void *arg) mdeg_get_diff_results(mdd, &mdeg_res); /* call the client callback */ - (*clnt->cb)(clnt->cb_arg, &mdeg_res); + (void) (*clnt->cb)(clnt->cb_arg, &mdeg_res); MDEG_DBG("MDEG client callback done\n"); @@ -658,13 +658,13 @@ mdeg_find_start_node(md_t *md, mdeg_node_spec_t *nspec) nname = md_find_name(md, nspec->namep); aname = md_find_name(md, "fwd"); - nnodes = md_scan_dag(md, NULL, nname, aname, NULL); + nnodes = md_scan_dag(md, 0, nname, aname, NULL); if (nnodes == 0) return (MDE_INVAL_ELEM_COOKIE); nodesp = kmem_alloc(sizeof (mde_cookie_t) * nnodes, KM_SLEEP); - (void) md_scan_dag(md, NULL, nname, aname, nodesp); + (void) md_scan_dag(md, 0, nname, aname, nodesp); for (idx = 0; idx < nnodes; idx++) { diff --git a/usr/src/uts/sun4v/io/n2piupc/n2piupc.h b/usr/src/uts/sun4v/io/n2piupc/n2piupc.h index b9c224618f..689d0c5ef5 100644 --- a/usr/src/uts/sun4v/io/n2piupc/n2piupc.h +++ b/usr/src/uts/sun4v/io/n2piupc/n2piupc.h @@ -31,8 +31,6 @@ * Definitions which deal with things other than registers. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -65,8 +63,8 @@ extern int n2piupc_debug; #define N2PIUPC_DBG1 if (n2piupc_debug >= 1) printf #define N2PIUPC_DBG2 if (n2piupc_debug >= 2) printf #else -#define N2PIUPC_DBG1 0 && -#define N2PIUPC_DBG2 0 && +#define N2PIUPC_DBG1(...) +#define N2PIUPC_DBG2(...) #endif /* DEBUG */ diff --git a/usr/src/uts/sun4v/io/n2piupc/n2piupc_asm.s b/usr/src/uts/sun4v/io/n2piupc/n2piupc_asm.s index 693c9103d5..1fef3fdea1 100644 --- a/usr/src/uts/sun4v/io/n2piupc/n2piupc_asm.s +++ b/usr/src/uts/sun4v/io/n2piupc/n2piupc_asm.s @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Assembly language support for the n2piupc N2 PIU performance counter driver. */ @@ -36,20 +34,6 @@ /*LINTLIBRARY*/ -#if defined(lint) - -/*ARGSUSED*/ -int -n2piupc_get_perfreg(cntr_handle_t handle, int regid, uint64_t *data) -{ return (0); } - -/*ARGSUSED*/ -int -n2piupc_set_perfreg(cntr_handle_t handle, int regid, uint64_t data) -{ return (0); } - -#else /* lint */ - ENTRY(n2piupc_get_perfreg) mov N2PIU_GET_PERFREG, %o5 ta FAST_TRAP @@ -66,4 +50,3 @@ n2piupc_set_perfreg(cntr_handle_t handle, int regid, uint64_t data) nop SET_SIZE(n2piupc_set_perfreg) -#endif diff --git a/usr/src/uts/sun4v/io/n2piupc/n2piupc_kstats.c b/usr/src/uts/sun4v/io/n2piupc/n2piupc_kstats.c index 0b22142ea2..6881d58a20 100644 --- a/usr/src/uts/sun4v/io/n2piupc/n2piupc_kstats.c +++ b/usr/src/uts/sun4v/io/n2piupc/n2piupc_kstats.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/kstat.h> #include "n2piupc_acc.h" @@ -68,7 +66,7 @@ n2piupc_kstat_init() /* Create basic pic event-type pair. */ grp_p->name_kstats_pp = kmem_zalloc((grp_p->num_counters * - sizeof (kstat_t)), KM_SLEEP); + sizeof (kstat_t)), KM_SLEEP); if (n2piupc_create_name_kstat(grp_p) != DDI_SUCCESS) { n2piupc_kstat_fini(); N2PIUPC_DBG1("n2piupc: init: failure exit\n"); @@ -183,7 +181,7 @@ n2piupc_create_picN_kstat(char *mod_name, int pic, uint64_t ev_offset, (void) snprintf(pic_name, PIC_STR_LEN, "pic%1d", pic); if ((picN_ksp = kstat_create(mod_name, 0, 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); return (NULL); diff --git a/usr/src/uts/sun4v/io/n2rng/n2rng.c b/usr/src/uts/sun4v/io/n2rng/n2rng.c index 2b8827fd49..144d60b880 100644 --- a/usr/src/uts/sun4v/io/n2rng/n2rng.c +++ b/usr/src/uts/sun4v/io/n2rng/n2rng.c @@ -944,7 +944,7 @@ n2rng_check_ctl_access(n2rng_t *n2rng) * Attempt to read control registers with invalid ID and data * just to see if we get an access error */ - rv = hv_rng_ctl_read_v2(NULL, N2RNG_INVALID_ID, + rv = hv_rng_ctl_read_v2(0, N2RNG_INVALID_ID, &unused_64, &unused_64, &unused_64, &unused_64); } else { rv = hv_rng_get_diag_control(); diff --git a/usr/src/uts/sun4v/io/n2rng/n2rng_hcall.s b/usr/src/uts/sun4v/io/n2rng/n2rng_hcall.s index 276b14a7a8..0c2f994472 100644 --- a/usr/src/uts/sun4v/io/n2rng/n2rng_hcall.s +++ b/usr/src/uts/sun4v/io/n2rng/n2rng_hcall.s @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Hypervisor calls called by ncp driver. */ @@ -33,54 +31,6 @@ #include <sys/hypervisor_api.h> #include <sys/n2rng.h> -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -hv_rng_get_diag_control() -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_ctl_read(uint64_t ctlregsptr_ra, uint64_t *rstate, uint64_t *tdelta) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_ctl_read_v2(uint64_t ctlregsptr_ra, uint64_t rngid, uint64_t *rstate, - uint64_t *tdelta, uint64_t *wdelta, uint64_t *wstate) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_ctl_write(uint64_t ctlregsptr_ra, uint64_t nstate, uint64_t wtimeout, - uint64_t *tdelta) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_ctl_write_v2(uint64_t ctlregsptr_ra, uint64_t nstate, uint64_t wtimeout, - uint64_t rngid) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_data_read_diag(uint64_t buffer_ra, uint64_t sz, uint64_t *tdelta) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_data_read_diag_v2(uint64_t buffer_ra, uint64_t sz, uint64_t rngid, - uint64_t *tdelta) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_rng_data_read(uint64_t buffer_ra, uint64_t *tdelta) -{ return (0); } - -#else /* lint || __lint */ - /* * hv_rng_get_diag_control() */ @@ -183,4 +133,3 @@ hv_rng_data_read(uint64_t buffer_ra, uint64_t *tdelta) stx %o1, [%o4] SET_SIZE(hv_rng_data_read) -#endif /* lint || __lint */ diff --git a/usr/src/uts/sun4v/io/n2rng/n2rng_kcf.c b/usr/src/uts/sun4v/io/n2rng/n2rng_kcf.c index 5e101472ee..afe6cd47fe 100644 --- a/usr/src/uts/sun4v/io/n2rng/n2rng_kcf.c +++ b/usr/src/uts/sun4v/io/n2rng/n2rng_kcf.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/uio.h> #include <sys/stream.h> @@ -72,7 +70,7 @@ static crypto_random_number_ops_t n2rng_rng_ops = { static crypto_provider_management_ops_t n2rng_extinfo_op = { ext_info, /* ext_info */ NULL, /* init_token */ - NULL, /* init_pin */ + NULL, /* init_pin */ NULL, /* set_pin */ }; @@ -207,7 +205,7 @@ n2rng_register_provider(n2rng_t *n2rng) } else { cmn_err(CE_WARN, "crypto_register_provider() failed (%d)", ret); - n2rng->n_prov = NULL; + n2rng->n_prov = 0; return (DDI_FAILURE); } } @@ -236,7 +234,7 @@ n2rng_unregister_provider(n2rng_t *n2rng) return (DDI_FAILURE); } } - n2rng->n_prov = NULL; + n2rng->n_prov = 0; n2rng_clrregistered(n2rng); return (DDI_SUCCESS); } @@ -408,8 +406,8 @@ n2rng_provider_status(crypto_provider_handle_t provider, uint_t *status) /*ARGSUSED*/ static int n2rng_random_number(crypto_provider_handle_t provider, - crypto_session_id_t sess, unsigned char *buf, size_t buflen, - crypto_req_handle_t cfreq) + crypto_session_id_t sess, unsigned char *buf, size_t buflen, + crypto_req_handle_t cfreq) { n2rng_t *n2rng = (n2rng_t *)provider; int rv; diff --git a/usr/src/uts/sun4v/io/niumx/niumx.c b/usr/src/uts/sun4v/io/niumx/niumx.c index b455d287e6..76b30a3804 100644 --- a/usr/src/uts/sun4v/io/niumx/niumx.c +++ b/usr/src/uts/sun4v/io/niumx/niumx.c @@ -97,19 +97,19 @@ static struct bus_ops niumx_bus_ops = { 0, niumx_ctlops, ddi_bus_prop_op, - 0, /* (*bus_get_eventcookie)(); */ + 0, /* (*bus_get_eventcookie)(); */ 0, /* (*bus_add_eventcall)(); */ - 0, /* (*bus_remove_eventcall)(); */ + 0, /* (*bus_remove_eventcall)(); */ 0, /* (*bus_post_event)(); */ 0, /* (*bus_intr_ctl)(); */ - 0, /* (*bus_config)(); */ - 0, /* (*bus_unconfig)(); */ - niumx_fm_init_child, /* (*bus_fm_init)(); */ - 0, /* (*bus_fm_fini)(); */ + 0, /* (*bus_config)(); */ + 0, /* (*bus_unconfig)(); */ + niumx_fm_init_child, /* (*bus_fm_init)(); */ + 0, /* (*bus_fm_fini)(); */ 0, /* (*bus_enter)() */ 0, /* (*bus_exit)() */ 0, /* (*bus_power)() */ - niumx_intr_ops /* (*bus_intr_op)(); */ + niumx_intr_ops /* (*bus_intr_op)(); */ }; extern struct cb_ops niumx_cb_ops; @@ -199,7 +199,7 @@ void niumx_intr_dist(void *arg) { niumx_devstate_t *niumxds_p = (niumx_devstate_t *)arg; - kmutex_t *lock_p = &niumxds_p->niumx_mutex; + kmutex_t *lock_p = &niumxds_p->niumx_mutex; int i; niumx_ih_t *ih_p = niumxds_p->niumx_ihtable; @@ -367,13 +367,13 @@ niumx_fm_init_child(dev_info_t *dip, dev_info_t *cdip, int cap, /*ARGSUSED*/ int niumx_map(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp, - off_t offset, off_t len, caddr_t *vaddrp) + off_t offset, off_t len, caddr_t *vaddrp) { struct regspec p_regspec; ddi_map_req_t p_mapreq; - niu_regspec_t *reg_p; - int i, rn = mp->map_obj.rnumber, reglen, rnglen, rngnum, ret; - niumx_ranges_t *rng_p; + niu_regspec_t *reg_p; + int i, rn = mp->map_obj.rnumber, reglen, rnglen, rngnum, ret; + niumx_ranges_t *rng_p; uint32_t reg_begin, rng_begin; @@ -453,7 +453,7 @@ err: */ int niumx_ctlops(dev_info_t *dip, dev_info_t *rdip, - ddi_ctl_enum_t ctlop, void *arg, void *result) + ddi_ctl_enum_t ctlop, void *arg, void *result) { niu_regspec_t *reg_p; int reglen, totreg; @@ -644,7 +644,7 @@ niumx_removechild(dev_info_t *dip) /*ARGSUSED*/ int niumx_dma_allochdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_attr_t *attrp, - int (*waitfp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep) + int (*waitfp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep) { ddi_dma_impl_t *mp; int sleep = (waitfp == DDI_DMA_SLEEP) ? KM_SLEEP : KM_NOSLEEP; @@ -671,7 +671,7 @@ niumx_dma_allochdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_attr_t *attrp, mp->dmai_fault_check = NULL; mp->dmai_fault_notify = NULL; - mp->dmai_attr = *attrp; /* set requestors attr info */ + mp->dmai_attr = *attrp; /* set requestors attr info */ DBG(NIUMX_DBG_DMA_ALLOCH, dip, "mp=%p\n", mp); @@ -714,16 +714,16 @@ niumx_dma_freehdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_handle_t handle) * dma handle members affected (set on exit): * mp->dmai_object - dmareq->dmar_object * mp->dmai_rflags - dmareq->dmar_flags - * mp->dmai_pfn0 - 1st page pfn (if va/size pair and not shadow) - * mp->dmai_roffset - initialized to starting page offset + * mp->dmai_pfn0 - 1st page pfn (if va/size pair and not shadow) + * mp->dmai_roffset - initialized to starting page offset * mp->dmai_size - # of total pages of entire object * mp->dmai_cookie - new cookie alloc'd */ /*ARGSUSED*/ int niumx_dma_bindhdl(dev_info_t *dip, dev_info_t *rdip, - ddi_dma_handle_t handle, ddi_dma_req_t *dmareq, - ddi_dma_cookie_t *cookiep, uint_t *ccountp) + ddi_dma_handle_t handle, ddi_dma_req_t *dmareq, + ddi_dma_cookie_t *cookiep, uint_t *ccountp) { int (*waitfp)(caddr_t) = dmareq->dmar_fp; ddi_dma_impl_t *mp = (ddi_dma_impl_t *)handle; @@ -921,7 +921,7 @@ niumx_set_intr(dev_info_t *dip, dev_info_t *rdip, int ret = DDI_SUCCESS; uint64_t hvret; niumx_devstate_t *niumxds_p; /* devstate pointer */ - int instance = ddi_get_instance(dip); + int instance = ddi_get_instance(dip); niumxds_p = (niumx_devstate_t *)ddi_get_soft_state(niumx_state, instance); @@ -1142,7 +1142,7 @@ niumx_rem_intr(dev_info_t *dip, dev_info_t *rdip, niumx_ih_t *ih_p; int ret = DDI_SUCCESS, state; hrtime_t start; - niusysino_t sysino; + niusysino_t sysino; niumx_devstate_t *niumxds_p; /* devstate pointer */ int instance = ddi_get_instance(dip); @@ -1175,7 +1175,8 @@ niumx_rem_intr(dev_info_t *dip, dev_info_t *rdip, ih_p->ih_sysino = 0; hdlp->ih_vector = (uint32_t)sysino; - if (hdlp->ih_vector != NULL) i_ddi_rem_ivintr(hdlp); + if (hdlp->ih_vector != 0) + i_ddi_rem_ivintr(hdlp); fail: return (ret); diff --git a/usr/src/uts/sun4v/io/ntwdt.c b/usr/src/uts/sun4v/io/ntwdt.c index 5dcace595a..ac11471533 100644 --- a/usr/src/uts/sun4v/io/ntwdt.c +++ b/usr/src/uts/sun4v/io/ntwdt.c @@ -314,7 +314,7 @@ ntwdt_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) * is initialized. */ if (ddi_create_minor_node(dip, NTWDT_MINOR_NODE, S_IFCHR, 0, - DDI_PSEUDO, NULL) == DDI_FAILURE) { + DDI_PSEUDO, 0) == DDI_FAILURE) { cmn_err(CE_WARN, "failed to create Minor Node: %s", NTWDT_MINOR_NODE); goto err3; @@ -466,7 +466,7 @@ ntwdt_close(dev_t dev, int flag, int otyp, cred_t *credp) /*ARGSUSED*/ static int ntwdt_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, - int *rvalp) + int *rvalp) { int instance = getminor(dev); int retval = 0; diff --git a/usr/src/uts/sun4v/io/pciex/pci_cfgacc_asm.s b/usr/src/uts/sun4v/io/pciex/pci_cfgacc_asm.s index c70e8ec190..1c42909b84 100644 --- a/usr/src/uts/sun4v/io/pciex/pci_cfgacc_asm.s +++ b/usr/src/uts/sun4v/io/pciex/pci_cfgacc_asm.s @@ -35,22 +35,6 @@ #include <io/px/px_ioapi.h> #include <io/px/px_lib4v.h> -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -hvio_config_get(devhandle_t dev_hdl, pci_device_t bdf, pci_config_offset_t off, - pci_config_size_t size, pci_cfg_data_t *data_p) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_config_put(devhandle_t dev_hdl, pci_device_t bdf, pci_config_offset_t off, - pci_config_size_t size, pci_cfg_data_t data) -{ return (0); } - -#else /* lint || __lint */ - /* * arg0 - devhandle * arg1 - pci_device @@ -90,4 +74,3 @@ hvio_config_put(devhandle_t dev_hdl, pci_device_t bdf, pci_config_offset_t off, retl nop SET_SIZE(hvio_config_put) -#endif diff --git a/usr/src/uts/sun4v/io/px/px_err.c b/usr/src/uts/sun4v/io/px/px_err.c index e99ca6b882..3bdd99aaf6 100644 --- a/usr/src/uts/sun4v/io/px/px_err.c +++ b/usr/src/uts/sun4v/io/px/px_err.c @@ -151,7 +151,7 @@ px_err_fill_pfd(dev_info_t *dip, pf_data_t *pfd_p, px_rc_err_t *epkt) { case BLOCK_MMU: /* Only PIO Fault Addresses are valid, this is DMA */ s_status = PCI_STAT_S_TARG_AB; - fault_addr = NULL; + fault_addr = 0; if (epkt->rc_descr.H) { fault_bdf = (pcie_req_id_t)(epkt->hdr[0] >> 16); @@ -836,7 +836,7 @@ px_mmu_handle_lookup(dev_info_t *dip, ddi_fm_error_t *derr, px_rc_err_t *epkt) pcie_req_id_t bdf = PCIE_INVALID_BDF; if (epkt->rc_descr.H) { - bdf = (uint32_t)((epkt->hdr[0] >> 16) && 0xFFFF); + bdf = (uint32_t)((epkt->hdr[0] >> 16) & 0xFFFF); } return (pf_hdl_lookup(dip, derr->fme_ena, PF_ADDR_DMA, addr, diff --git a/usr/src/uts/sun4v/io/px/px_hcall.s b/usr/src/uts/sun4v/io/px/px_hcall.s index 6339d5a1ed..8213a4bb37 100644 --- a/usr/src/uts/sun4v/io/px/px_hcall.s +++ b/usr/src/uts/sun4v/io/px/px_hcall.s @@ -34,186 +34,6 @@ #include <px_ioapi.h> #include "px_lib4v.h" -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -hvio_iommu_map(devhandle_t dev_hdl, tsbid_t tsbid, pages_t pages, - io_attributes_t attr, io_page_list_t *io_page_list_p, - pages_t *pages_mapped) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_iommu_demap(devhandle_t dev_hdl, tsbid_t tsbid, pages_t pages, - pages_t *pages_demapped) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_iommu_getmap(devhandle_t dev_hdl, tsbid_t tsbid, io_attributes_t *attr_p, - r_addr_t *r_addr_p) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_iommu_getbypass(devhandle_t dev_hdl, r_addr_t ra, io_attributes_t attr, - io_addr_t *io_addr_p) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_peek(devhandle_t dev_hdl, r_addr_t ra, size_t size, uint32_t *status, - uint64_t *data_p) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_poke(devhandle_t dev_hdl, r_addr_t ra, uint64_t sizes, uint64_t data, - r_addr_t ra2, uint32_t *rdbk_status) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_dma_sync(devhandle_t dev_hdl, r_addr_t ra, size_t num_bytes, - io_sync_direction_t io_sync_direction, size_t *bytes_synched) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_conf(devhandle_t dev_hdl, msiqid_t msiq_id, r_addr_t ra, - uint_t msiq_rec_cnt) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_info(devhandle_t dev_hdl, msiqid_t msiq_id, r_addr_t *r_addr_p, - uint_t *msiq_rec_cnt_p) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_getvalid(devhandle_t dev_hdl, msiqid_t msiq_id, - pci_msiq_valid_state_t *msiq_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_setvalid(devhandle_t dev_hdl, msiqid_t msiq_id, - pci_msiq_valid_state_t msiq_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_getstate(devhandle_t dev_hdl, msiqid_t msiq_id, - pci_msiq_state_t *msiq_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_setstate(devhandle_t dev_hdl, msiqid_t msiq_id, - pci_msiq_state_t msiq_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_gethead(devhandle_t dev_hdl, msiqid_t msiq_id, - msiqhead_t *msiq_head) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_sethead(devhandle_t dev_hdl, msiqid_t msiq_id, - msiqhead_t msiq_head) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msiq_gettail(devhandle_t dev_hdl, msiqid_t msiq_id, - msiqtail_t *msiq_tail) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msi_getmsiq(devhandle_t dev_hdl, msinum_t msi_num, - msiqid_t *msiq_id) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msi_setmsiq(devhandle_t dev_hdl, msinum_t msi_num, - msiqid_t msiq_id, msi_type_t msitype) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msi_getvalid(devhandle_t dev_hdl, msinum_t msi_num, - pci_msi_valid_state_t *msi_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msi_setvalid(devhandle_t dev_hdl, msinum_t msi_num, - pci_msi_valid_state_t msi_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msi_getstate(devhandle_t dev_hdl, msinum_t msi_num, - pci_msi_state_t *msi_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msi_setstate(devhandle_t dev_hdl, msinum_t msi_num, - pci_msi_state_t msi_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msg_getmsiq(devhandle_t dev_hdl, pcie_msg_type_t msg_type, - msiqid_t *msiq_id) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msg_setmsiq(devhandle_t dev_hdl, pcie_msg_type_t msg_type, - msiqid_t msiq_id) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msg_getvalid(devhandle_t dev_hdl, pcie_msg_type_t msg_type, - pcie_msg_valid_state_t *msg_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_msg_setvalid(devhandle_t dev_hdl, pcie_msg_type_t msg_type, - pcie_msg_valid_state_t msg_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -pci_error_send(devhandle_t dev_hdl, devino_t devino, pci_device_t bdf) -{ return (0); } - -/* - * First arg to both of these functions is a dummy, to accomodate how - * hv_hpriv() works. - */ -/*ARGSUSED*/ -int -px_phys_acc_4v(uint64_t dummy, uint64_t from_addr, uint64_t to_addr) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -pci_iov_root_configured(devhandle_t dev_hdl) -{ return (0); } - -#else /* lint || __lint */ - /* * arg0 - devhandle * arg1 - tsbid @@ -707,4 +527,3 @@ pci_iov_root_configured(devhandle_t dev_hdl) nop SET_SIZE(pci_iov_root_configured) -#endif /* lint || __lint */ diff --git a/usr/src/uts/sun4v/io/px/px_lib4v.c b/usr/src/uts/sun4v/io/px/px_lib4v.c index 54bcd03bef..710379950c 100644 --- a/usr/src/uts/sun4v/io/px/px_lib4v.c +++ b/usr/src/uts/sun4v/io/px/px_lib4v.c @@ -1686,7 +1686,7 @@ px_lib_log_safeacc_err(px_t *px_p, ddi_acc_handle_t handle, int fme_flag, } } - (void) px_rp_en_q(px_p, bdf, addr, NULL); + (void) px_rp_en_q(px_p, bdf, addr, 0); (void) px_scan_fabric(px_p, px_p->px_dip, &derr); px_fm_exit(px_p); } diff --git a/usr/src/uts/sun4v/io/px/px_tools_4v.c b/usr/src/uts/sun4v/io/px/px_tools_4v.c index 42ec37636b..288fa61e10 100644 --- a/usr/src/uts/sun4v/io/px/px_tools_4v.c +++ b/usr/src/uts/sun4v/io/px/px_tools_4v.c @@ -184,7 +184,7 @@ pxtool_phys_access(px_t *px_p, uintptr_t dev_addr, from_addr = dev_addr; } - rval = hv_hpriv((void *)pfunc, from_addr, to_addr, NULL); + rval = hv_hpriv((void *)pfunc, from_addr, to_addr, 0); switch (rval) { case H_ENOACCESS: /* Returned by non-debug hypervisor. */ rval = ENOTSUP; diff --git a/usr/src/uts/sun4v/io/vcc.c b/usr/src/uts/sun4v/io/vcc.c index 85f722e467..1c67f039e3 100644 --- a/usr/src/uts/sun4v/io/vcc.c +++ b/usr/src/uts/sun4v/io/vcc.c @@ -137,7 +137,7 @@ extern struct mod_ops mod_driverops; #define VCC_ID_PROP "id" /* - * This is the string displayed by modinfo(1m). + * This is the string displayed by modinfo(8). */ static char vcc_ident[] = "sun4v Virtual Console Concentrator Driver"; diff --git a/usr/src/uts/sun4v/io/vdc.c b/usr/src/uts/sun4v/io/vdc.c index ccea7403ea..4eb7694701 100644 --- a/usr/src/uts/sun4v/io/vdc.c +++ b/usr/src/uts/sun4v/io/vdc.c @@ -41,7 +41,7 @@ * allows the LDC clients to transfer data via memory mappings. * * 3) Support exported to upper layers (filesystems, etc) - * The upper layers call into vdc via strategy(9E) and DKIO(7I) + * The upper layers call into vdc via strategy(9E) and dkio(4I) * ioctl calls. vdc will copy the data to be written to the descriptor * ring or maps the buffer to store the data read by the vDisk * server into the descriptor ring. It then sends a message to the @@ -173,14 +173,14 @@ static int vdc_process_data_msg(vdc_t *vdc, vio_msg_t *msg); static int vdc_handle_ver_msg(vdc_t *vdc, vio_ver_msg_t *ver_msg); static int vdc_handle_attr_msg(vdc_t *vdc, vd_attr_msg_t *attr_msg); static int vdc_handle_dring_reg_msg(vdc_t *vdc, vio_dring_reg_msg_t *msg); -static int vdc_send_request(vdc_t *vdcp, int operation, +static int vdc_send_request(vdc_t *vdcp, int operation, caddr_t addr, size_t nbytes, int slice, diskaddr_t offset, buf_t *bufp, vio_desc_direction_t dir, int flags); static int vdc_map_to_shared_dring(vdc_t *vdcp, int idx); -static int vdc_populate_descriptor(vdc_t *vdcp, int operation, +static int vdc_populate_descriptor(vdc_t *vdcp, int operation, caddr_t addr, size_t nbytes, int slice, diskaddr_t offset, buf_t *bufp, vio_desc_direction_t dir, int flags); -static int vdc_do_sync_op(vdc_t *vdcp, int operation, caddr_t addr, +static int vdc_do_sync_op(vdc_t *vdcp, int operation, caddr_t addr, size_t nbytes, int slice, diskaddr_t offset, vio_desc_direction_t dir, boolean_t); static int vdc_do_op(vdc_t *vdc, int op, caddr_t addr, size_t nbytes, @@ -224,7 +224,7 @@ static int vdc_get_efi_convert(vdc_t *vdc, void *from, void *to, static int vdc_set_efi_convert(vdc_t *vdc, void *from, void *to, int mode, int dir); -static void vdc_ownership_update(vdc_t *vdc, int ownership_flags); +static void vdc_ownership_update(vdc_t *vdc, int ownership_flags); static int vdc_access_set(vdc_t *vdc, uint64_t flags); static vdc_io_t *vdc_eio_queue(vdc_t *vdc, int index); static void vdc_eio_unqueue(vdc_t *vdc, clock_t deadline, @@ -284,7 +284,7 @@ static uint_t vdc_hattr_min = VDC_HATTR_MIN; * various operations */ static int vdc_timeout = 0; /* units: seconds */ -static int vdc_ldcup_timeout = 1; /* units: seconds */ +static int vdc_ldcup_timeout = 1; /* units: seconds */ static uint64_t vdc_hz_min_ldc_delay; static uint64_t vdc_min_timeout_ldc = 1 * MILLISEC; @@ -724,7 +724,7 @@ vdc_do_attach(dev_info_t *dip) (void) md_fini_handle(mdp); - /* Create the kstats for saving the I/O statistics used by iostat(1M) */ + /* Create the kstats for saving the I/O statistics used by iostat(8) */ vdc_create_io_kstats(vdc); vdc_create_err_kstats(vdc); @@ -1074,7 +1074,7 @@ vdc_create_device_nodes_vtoc(vdc_t *vdc) * refers to a whole disk. Slices start at 'a' * * Parameters: - * vdc - soft state pointer + * vdc - soft state pointer * * Return Values * 0 - Success @@ -1192,7 +1192,7 @@ vdc_prop_op(dev_t dev, dev_info_t *dip, ddi_prop_op_t prop_op, int mod_flags, * currently opened. * * Parameters: - * vdc - soft state pointer + * vdc - soft state pointer * * Return Values * B_TRUE - at least one slice is opened. @@ -2576,7 +2576,7 @@ vdc_terminate_ldc(vdc_t *vdc, vdc_server_t *srvr) if (srvr->state & VDC_LDC_INIT) { DMSG(vdc, 0, "[%d] ldc_fini()\n", instance); (void) ldc_fini(srvr->ldc_handle); - srvr->ldc_handle = NULL; + srvr->ldc_handle = 0; } srvr->state &= ~(VDC_LDC_INIT | VDC_LDC_CB | VDC_LDC_OPEN); @@ -2682,7 +2682,7 @@ vdc_init_descriptor_ring(vdc_t *vdc) status = ldc_mem_dring_create(vdc->dring_len, vdc->dring_entry_size, &vdc->dring_hdl); - if ((vdc->dring_hdl == NULL) || (status != 0)) { + if ((vdc->dring_hdl == 0) || (status != 0)) { DMSG(vdc, 0, "[%d] Descriptor ring creation failed", vdc->instance); return (status); @@ -2773,7 +2773,7 @@ static void vdc_destroy_descriptor_ring(vdc_t *vdc) { vdc_local_desc_t *ldep = NULL; /* Local Dring Entry Pointer */ - ldc_mem_handle_t mhdl = NULL; + ldc_mem_handle_t mhdl = 0; ldc_mem_info_t minfo; int status = -1; int i; /* loop */ @@ -2790,7 +2790,7 @@ vdc_destroy_descriptor_ring(vdc_t *vdc) ldep = &vdc->local_dring[i]; mhdl = ldep->desc_mhdl; - if (mhdl == NULL) + if (mhdl == 0) continue; if ((status = ldc_mem_info(mhdl, &minfo)) != 0) { @@ -2803,7 +2803,7 @@ vdc_destroy_descriptor_ring(vdc_t *vdc) * is not valid. Clear it out so that * no one tries to use it. */ - ldep->desc_mhdl = NULL; + ldep->desc_mhdl = 0; continue; } @@ -2813,7 +2813,7 @@ vdc_destroy_descriptor_ring(vdc_t *vdc) (void) ldc_mem_free_handle(mhdl); - ldep->desc_mhdl = NULL; + ldep->desc_mhdl = 0; } vdc->initialized &= ~VDC_DRING_ENTRY; } @@ -2841,7 +2841,7 @@ vdc_destroy_descriptor_ring(vdc_t *vdc) DMSG(vdc, 0, "[%d] Destroying DRing\n", vdc->instance); status = ldc_mem_dring_destroy(vdc->dring_hdl); if (status == 0) { - vdc->dring_hdl = NULL; + vdc->dring_hdl = 0; bzero(&vdc->dring_mem_info, sizeof (ldc_mem_info_t)); vdc->initialized &= ~VDC_DRING_INIT; } else { @@ -3010,7 +3010,7 @@ done: /* * If this is a block read/write we update the I/O statistics kstat * to indicate that this request has been placed on the queue for - * processing (i.e sent to the vDisk server) - iostat(1M) will + * processing (i.e sent to the vDisk server) - iostat(8) will * report the time waiting for the vDisk server under the %b column * * In the case of an error we take it off the wait queue only if @@ -3197,7 +3197,7 @@ loop: * vdc_do_op * * Description: - * Wrapper around vdc_submit_request(). Each request is associated with a + * Wrapper around vdc_submit_request(). Each request is associated with a * buf structure. If a buf structure is provided (bufp != NULL) then the * request will be submitted with that buf, and the caller can wait for * completion of the request with biowait(). If a buf structure is not @@ -3321,7 +3321,7 @@ done: * vdc_do_sync_op * * Description: - * Wrapper around vdc_do_op that serializes requests. + * Wrapper around vdc_do_op that serializes requests. * * Arguments: * vdcp - the soft state pointer @@ -3411,9 +3411,9 @@ vdc_do_sync_op(vdc_t *vdcp, int operation, caddr_t addr, size_t nbytes, * vdc_drain_response() * * Description: - * When a guest is panicking, the completion of requests needs to be - * handled differently because interrupts are disabled and vdc - * will not get messages. We have to poll for the messages instead. + * When a guest is panicking, the completion of requests needs to be + * handled differently because interrupts are disabled and vdc + * will not get messages. We have to poll for the messages instead. * * Note: since we are panicking we don't implement the io:::done * DTrace probe or update the I/O statistics kstats. @@ -3431,9 +3431,9 @@ vdc_do_sync_op(vdc_t *vdcp, int operation, caddr_t addr, size_t nbytes, static int vdc_drain_response(vdc_t *vdc, struct buf *buf) { - int rv, idx, retries; + int rv, idx, retries; size_t msglen; - vdc_local_desc_t *ldep = NULL; /* Local Dring Entry Pointer */ + vdc_local_desc_t *ldep = NULL; /* Local Dring Entry Pointer */ vio_dring_msg_t dmsg; struct buf *mbuf; boolean_t ack; @@ -3926,7 +3926,7 @@ vdc_wait_for_response(vdc_t *vdcp, vio_msg_t *msgp) * * Description: * Resubmit each descriptor in the backed up dring to - * vDisk server. The Dring was backed up during connection + * vDisk server. The Dring was backed up during connection * reset. * * Arguments: @@ -4030,7 +4030,7 @@ void vdc_cancel_backup_dring(vdc_t *vdcp) { vdc_local_desc_t *ldep; - struct buf *bufp; + struct buf *bufp; int count; int b_idx; int dring_size; @@ -4118,7 +4118,7 @@ vdc_cancel_backup_dring(vdc_t *vdcp) void vdc_connection_timeout(void *arg) { - vdc_t *vdcp = (vdc_t *)arg; + vdc_t *vdcp = (vdc_t *)arg; mutex_enter(&vdcp->lock); @@ -4213,7 +4213,7 @@ static void vdc_switch_server(vdc_t *vdcp) { int rv; - vdc_server_t *curr_server, *new_server; + vdc_server_t *curr_server, *new_server; ASSERT(MUTEX_HELD(&vdcp->lock)); @@ -4410,9 +4410,9 @@ vdc_handshake_retry(vdc_t *vdcp, int hshake_cnt, int hattr_cnt) * Description: * * Main VDC message processing thread. Each vDisk instance - * consists of a copy of this thread. This thread triggers - * all the handshakes and data exchange with the server. It - * also handles all channel resets + * consists of a copy of this thread. This thread triggers + * all the handshakes and data exchange with the server. It + * also handles all channel resets * * Arguments: * vdc - soft state pointer for this instance of the device driver. @@ -5504,7 +5504,7 @@ vdc_is_supported_version(vio_ver_msg_t *ver_msg) /* -------------------------------------------------------------------------- */ /* - * DKIO(7) support + * dkio(4I) support */ typedef struct vdc_dk_arg { @@ -5516,7 +5516,7 @@ typedef struct vdc_dk_arg { /* * Function: - * vdc_dkio_flush_cb() + * vdc_dkio_flush_cb() * * Description: * This routine is a callback for DKIOCFLUSHWRITECACHE which can be called @@ -5572,7 +5572,7 @@ vdc_dkio_flush_cb(void *arg) /* * Function: - * vdc_dkio_gapart() + * vdc_dkio_gapart() * * Description: * This function implements the DKIOCGAPART ioctl. @@ -5638,7 +5638,7 @@ vdc_dkio_gapart(vdc_t *vdc, caddr_t arg, int flag) /* * Function: - * vdc_dkio_partition() + * vdc_dkio_partition() * * Description: * This function implements the DKIOCPARTITION ioctl. @@ -5691,7 +5691,7 @@ vdc_dkio_partition(vdc_t *vdc, caddr_t arg, int flag) /* * Function: - * vdc_dioctl_rwcmd() + * vdc_dioctl_rwcmd() * * Description: * This function implements the DIOCTL_RWCMD ioctl. This ioctl is used @@ -5926,7 +5926,7 @@ vdc_scsi_status(vdc_t *vdc, vd_scsi_t *vd_scsi, boolean_t log_error) } /* - * Implemented the USCSICMD uscsi(7I) ioctl. This ioctl is converted to + * Implemented the USCSICMD uscsi(4I) ioctl. This ioctl is converted to * a VD_OP_SCSICMD operation which is sent to the vdisk server. If a SCSI * reset is requested (i.e. a flag USCSI_RESET* is set) then the ioctl is * converted to a VD_OP_RESET operation. @@ -5934,15 +5934,15 @@ vdc_scsi_status(vdc_t *vdc, vd_scsi_t *vd_scsi, boolean_t log_error) static int vdc_uscsi_cmd(vdc_t *vdc, caddr_t arg, int mode) { - struct uscsi_cmd uscsi; + struct uscsi_cmd uscsi; struct uscsi_cmd32 uscsi32; - vd_scsi_t *vd_scsi; - int vd_scsi_len; + vd_scsi_t *vd_scsi; + int vd_scsi_len; union scsi_cdb *cdb; struct scsi_extended_sense *sense; - char *datain, *dataout; + char *datain, *dataout; size_t cdb_len, datain_len, dataout_len, sense_len; - int rv; + int rv; if (ddi_model_convert_from(mode & FMODELS) == DDI_MODEL_ILP32) { if (ddi_copyin(arg, &uscsi32, sizeof (struct uscsi_cmd32), @@ -6180,7 +6180,7 @@ vdc_scsi_alloc_persistent_out(uchar_t cmd, int len, int *vd_scsi_len) } /* - * Implement the MHIOCGRP_INKEYS mhd(7i) ioctl. The ioctl is converted + * Implement the MHIOCGRP_INKEYS mhd(4I) ioctl. The ioctl is converted * to a SCSI PERSISTENT IN READ KEYS command which is sent to the vdisk * server with a VD_OP_SCSICMD operation. */ @@ -6292,7 +6292,7 @@ done: } /* - * Implement the MHIOCGRP_INRESV mhd(7i) ioctl. The ioctl is converted + * Implement the MHIOCGRP_INRESV mhd(4I) ioctl. The ioctl is converted * to a SCSI PERSISTENT IN READ RESERVATION command which is sent to * the vdisk server with a VD_OP_SCSICMD operation. */ @@ -6420,7 +6420,7 @@ done: } /* - * Implement the MHIOCGRP_REGISTER mhd(7i) ioctl. The ioctl is converted + * Implement the MHIOCGRP_REGISTER mhd(4I) ioctl. The ioctl is converted * to a SCSI PERSISTENT OUT REGISTER command which is sent to the vdisk * server with a VD_OP_SCSICMD operation. */ @@ -6459,7 +6459,7 @@ vdc_mhd_register(vdc_t *vdc, caddr_t arg, int mode) } /* - * Implement the MHIOCGRP_RESERVE mhd(7i) ioctl. The ioctl is converted + * Implement the MHIOCGRP_RESERVE mhd(4I) ioctl. The ioctl is converted * to a SCSI PERSISTENT OUT RESERVE command which is sent to the vdisk * server with a VD_OP_SCSICMD operation. */ @@ -6500,7 +6500,7 @@ vdc_mhd_reserve(vdc_t *vdc, caddr_t arg, int mode) } /* - * Implement the MHIOCGRP_PREEMPTANDABORT mhd(7i) ioctl. The ioctl is + * Implement the MHIOCGRP_PREEMPTANDABORT mhd(4I) ioctl. The ioctl is * converted to a SCSI PERSISTENT OUT PREEMPT AND ABORT command which * is sent to the vdisk server with a VD_OP_SCSICMD operation. */ @@ -6545,7 +6545,7 @@ vdc_mhd_preemptabort(vdc_t *vdc, caddr_t arg, int mode) } /* - * Implement the MHIOCGRP_REGISTERANDIGNOREKEY mhd(7i) ioctl. The ioctl + * Implement the MHIOCGRP_REGISTERANDIGNOREKEY mhd(4I) ioctl. The ioctl * is converted to a SCSI PERSISTENT OUT REGISTER AND IGNORE EXISTING KEY * command which is sent to the vdisk server with a VD_OP_SCSICMD operation. */ @@ -6934,7 +6934,7 @@ vdc_eio_thread(void *arg) } /* - * Implement the MHIOCENFAILFAST mhd(7i) ioctl. + * Implement the MHIOCENFAILFAST mhd(4I) ioctl. */ static int vdc_failfast(vdc_t *vdc, caddr_t arg, int mode) @@ -6959,7 +6959,7 @@ vdc_failfast(vdc_t *vdc, caddr_t arg, int mode) } /* - * Implement the MHIOCTKOWN and MHIOCRELEASE mhd(7i) ioctls. These ioctls are + * Implement the MHIOCTKOWN and MHIOCRELEASE mhd(4I) ioctls. These ioctls are * converted to VD_OP_SET_ACCESS operations. */ static int @@ -6975,7 +6975,7 @@ vdc_access_set(vdc_t *vdc, uint64_t flags) } /* - * Implement the MHIOCSTATUS mhd(7i) ioctl. This ioctl is converted to a + * Implement the MHIOCSTATUS mhd(4I) ioctl. This ioctl is converted to a * VD_OP_GET_ACCESS operation. */ static int @@ -7166,7 +7166,7 @@ vdc_check_capacity(vdc_t *vdc) } /* - * This structure is used in the DKIO(7I) array below. + * This structure is used in the dkio(4I) array below. */ typedef struct vdc_dk_ioctl { uint8_t op; /* VD_OP_XXX value */ @@ -7179,7 +7179,7 @@ typedef struct vdc_dk_ioctl { } vdc_dk_ioctl_t; /* - * Subset of DKIO(7I) operations currently supported + * Subset of dkio(4I) operations currently supported */ static vdc_dk_ioctl_t dk_ioctl[] = { {VD_OP_FLUSH, DKIOCFLUSHWRITECACHE, 0, @@ -7200,7 +7200,7 @@ static vdc_dk_ioctl_t dk_ioctl[] = { vdc_get_geom_convert}, {VD_OP_GET_DISKGEOM, DKIOCG_PHYGEOM, sizeof (vd_geom_t), vdc_get_geom_convert}, - {VD_OP_GET_DISKGEOM, DKIOCG_VIRTGEOM, sizeof (vd_geom_t), + {VD_OP_GET_DISKGEOM, DKIOCG_VIRTGEOM, sizeof (vd_geom_t), vdc_get_geom_convert}, {VD_OP_SET_DISKGEOM, DKIOCSGEOM, sizeof (vd_geom_t), vdc_set_geom_convert}, @@ -7212,21 +7212,21 @@ static vdc_dk_ioctl_t dk_ioctl[] = { /* DIOCTL_RWCMD is converted to a read or a write */ {0, DIOCTL_RWCMD, sizeof (struct dadkio_rwcmd), NULL}, - /* mhd(7I) non-shared multihost disks ioctls */ + /* mhd(4I) non-shared multihost disks ioctls */ {0, MHIOCTKOWN, 0, vdc_null_copy_func}, {0, MHIOCRELEASE, 0, vdc_null_copy_func}, {0, MHIOCSTATUS, 0, vdc_null_copy_func}, {0, MHIOCQRESERVE, 0, vdc_null_copy_func}, - /* mhd(7I) shared multihost disks ioctls */ + /* mhd(4I) shared multihost disks ioctls */ {0, MHIOCGRP_INKEYS, 0, vdc_null_copy_func}, {0, MHIOCGRP_INRESV, 0, vdc_null_copy_func}, {0, MHIOCGRP_REGISTER, 0, vdc_null_copy_func}, - {0, MHIOCGRP_RESERVE, 0, vdc_null_copy_func}, + {0, MHIOCGRP_RESERVE, 0, vdc_null_copy_func}, {0, MHIOCGRP_PREEMPTANDABORT, 0, vdc_null_copy_func}, {0, MHIOCGRP_REGISTERANDIGNOREKEY, 0, vdc_null_copy_func}, - /* mhd(7I) failfast ioctl */ + /* mhd(4I) failfast ioctl */ {0, MHIOCENFAILFAST, 0, vdc_null_copy_func}, /* @@ -7268,7 +7268,7 @@ vd_process_efi_ioctl(void *vdisk, int cmd, uintptr_t arg) * * Arguments: * dev - the device number - * cmd - the operation [dkio(7I)] to be processed + * cmd - the operation [dkio(4I)] to be processed * arg - pointer to user provided structure * (contains data to be set or reference parameter for get) * mode - bit flag, indicating open settings, 32/64 bit type, etc @@ -7578,9 +7578,10 @@ vd_process_ioctl(dev_t dev, int cmd, caddr_t arg, int mode, int *rvalp) vdc->dkio_flush_pending--; mutex_exit(&vdc->lock); kmem_free(dkarg, sizeof (vdc_dk_arg_t)); + return (ENOMEM); } - return (rv == NULL ? ENOMEM : 0); + return (0); } } @@ -8094,7 +8095,7 @@ vdc_set_efi_convert(vdc_t *vdc, void *from, void *to, int mode, int dir) * * Description: * This routine fakes up the disk info needed for some DKIO ioctls such - * as DKIOCINFO and DKIOCGMEDIAINFO [just like lofi(7D) and ramdisk(7D) do] + * as DKIOCINFO and DKIOCGMEDIAINFO [just like lofi(4D) and ramdisk(4D) do] * * Note: This function must not be called until the vDisk attributes have * been exchanged as part of the handshake with the vDisk server. diff --git a/usr/src/uts/sun4v/io/vds.c b/usr/src/uts/sun4v/io/vds.c index 15d263a1b9..dd1de67c8f 100644 --- a/usr/src/uts/sun4v/io/vds.c +++ b/usr/src/uts/sun4v/io/vds.c @@ -70,7 +70,7 @@ #define VDS_DEV_DELAY 10000000 /* 10 secs */ #define VDS_NCHAINS 32 -/* Identification parameters for MD, synthetic dkio(7i) structures, etc. */ +/* Identification parameters for MD, synthetic dkio(4I) structures, etc. */ #define VDS_NAME "virtual-disk-server" #define VD_NAME "vd" @@ -168,7 +168,7 @@ typedef struct vd_driver_type { * The list can be extended by adding a "driver-type-list" entry in vds.conf * with the following syntax: * - * driver-type-list="<driver>:<type>", ... ,"<driver>:<type>"; + * driver-type-list="<driver>:<type>", ... ,"<driver>:<type>"; * * Where: * <driver> is the name of a driver (limited to 64 characters) @@ -178,7 +178,7 @@ typedef struct vd_driver_type { * * For example, the following line in vds.conf: * - * driver-type-list="foo:disk","bar:volume"; + * driver-type-list="foo:disk","bar:volume"; * * defines that "foo" is a disk driver, and driver "bar" is a volume driver. * @@ -256,7 +256,7 @@ vd_driver_type_t vds_driver_types[] = { static mdeg_prop_spec_t vds_prop_template[] = { { MDET_PROP_STR, "name", VDS_NAME }, { MDET_PROP_VAL, "cfg-handle", NULL }, - { MDET_LIST_END, NULL, NULL } + { MDET_LIST_END, NULL, NULL } }; #define VDS_SET_MDEG_PROP_INST(specp, val) (specp)[1].ps_val = (val); @@ -290,7 +290,7 @@ typedef struct vd_option { vd_option_t vd_bdev_options[] = { { "ro", VD_OPT_RDONLY }, - { "slice", VD_OPT_SLICE }, + { "slice", VD_OPT_SLICE }, { "excl", VD_OPT_EXCLUSIVE } }; @@ -407,7 +407,7 @@ typedef struct vds { mdeg_node_spec_t *ispecp; /* mdeg node specification */ mdeg_handle_t mdeg; /* handle for MDEG operations */ vd_driver_type_t *driver_types; /* extra driver types (from vds.conf) */ - int num_drivers; /* num of extra driver types */ + int num_drivers; /* num of extra driver types */ } vds_t; /* @@ -595,7 +595,7 @@ static int vd_awflush = VD_AWFLUSH_IMMEDIATE | VD_AWFLUSH_GROUP; * the service domain to panic. In both cases, the reset of the service domain * should trigger a reset SCSI buses and hopefully clear any SCSI-2 reservation. */ -static int vd_reset_access_failure = 0; +static int vd_reset_access_failure = 0; /* * Tunable for backward compatibility. When this variable is set to B_TRUE, @@ -694,8 +694,8 @@ extern int is_pseudo_device(dev_info_t *); * vd_get_readable_size * * Description: - * Convert a given size in bytes to a human readable format in - * kilobytes, megabytes, gigabytes or terabytes. + * Convert a given size in bytes to a human readable format in + * kilobytes, megabytes, gigabytes or terabytes. * * Parameters: * full_size - the size to convert in bytes. @@ -729,7 +729,7 @@ vd_get_readable_size(size_t full_size, size_t *size, char *unit) * vd_dskimg_io_params * * Description: - * Convert virtual disk I/O parameters (slice, block, length) to + * Convert virtual disk I/O parameters (slice, block, length) to * (offset, length) relative to the disk image and according to * the virtual disk partitioning. * @@ -848,7 +848,7 @@ vd_dskimg_io_params(vd_t *vd, int slice, size_t *blkp, size_t *lenp) * vd_dskimg_rw * * Description: - * Read or write to a disk image. It handles the case where the disk + * Read or write to a disk image. It handles the case where the disk * image is a file or a volume exported as a full disk or a file * exported as single-slice disk. Read or write to volumes exported as * single slice disks are done by directly using the ldi interface. @@ -891,7 +891,7 @@ vd_dskimg_rw(vd_t *vd, int slice, int operation, caddr_t data, size_t offset, ((operation == VD_OP_BREAD)? B_READ : B_WRITE); buf.b_bcount = len; buf.b_lblkno = offset; - buf.b_edev = vd->dev[0]; + buf.b_edev = vd->dev[0]; buf.b_un.b_addr = data; /* @@ -986,9 +986,9 @@ vd_build_default_label(size_t disk_size, size_t bsize, struct dk_label *label) * * Other parameters are computed from these values: * - * pcyl = disk_size / (nhead * nsect * 512) - * acyl = (pcyl > 2)? 2 : 0 - * ncyl = pcyl - acyl + * pcyl = disk_size / (nhead * nsect * 512) + * acyl = (pcyl > 2)? 2 : 0 + * ncyl = pcyl - acyl * * The maximum number of cylinder is 65535 so this allows to define a * geometry for a disk size up to 65535 * 96 * 768 * 512 = 2.24 TB @@ -1040,7 +1040,7 @@ vd_build_default_label(size_t disk_size, size_t bsize, struct dk_label *label) vd_get_readable_size(disk_size, &size, &unit); /* - * We must have a correct label name otherwise format(1m) will + * We must have a correct label name otherwise format(8) will * not recognized the disk as labeled. */ (void) snprintf(label->dkl_asciilabel, LEN_DKL_ASCII, @@ -1358,7 +1358,7 @@ vd_dskimg_write_devid(vd_t *vd, ddi_devid_t devid) * vd_do_scsi_rdwr * * Description: - * Read or write to a SCSI disk using an absolute disk offset. + * Read or write to a SCSI disk using an absolute disk offset. * * Parameters: * vd - disk on which the operation is performed. @@ -1482,7 +1482,7 @@ vd_do_scsi_rdwr(vd_t *vd, int operation, caddr_t data, size_t blk, size_t len) * vd_scsi_rdwr * * Description: - * Wrapper function to read or write to a SCSI disk using an absolute + * Wrapper function to read or write to a SCSI disk using an absolute * disk offset. It checks the blocksize of the underlying device and, * if necessary, adjusts the buffers accordingly before calling * vd_do_scsi_rdwr() to do the actual read or write. @@ -1562,7 +1562,7 @@ vd_scsi_rdwr(vd_t *vd, int operation, caddr_t data, size_t vblk, size_t vlen) * ^ ^ * |<--------------------->| * | plen - * pblk + * pblk */ /* END CSTYLED */ pblk = (vblk * vd->vdisk_bsize) / vd->backend_bsize; @@ -1897,7 +1897,7 @@ vd_flush_write(vd_t *vd) status = VOP_FSYNC(vd->file_vnode, FSYNC, kcred, NULL); } else { status = ldi_ioctl(vd->ldi_handle[0], DKIOCFLUSHWRITECACHE, - NULL, vd->open_flags | FKIOCTL, kcred, &rval); + (intptr_t)NULL, vd->open_flags | FKIOCTL, kcred, &rval); } return (status); @@ -1973,7 +1973,7 @@ vd_start_bio(vd_task_t *task) vd_dring_payload_t *request = task->request; struct buf *buf = &task->buf; uint8_t mtype; - int slice; + int slice; char *bufaddr = 0; size_t buflen; size_t offset, length, nbytes; @@ -2116,7 +2116,7 @@ vd_start_bio(vd_task_t *task) buf->b_bcount = length; buf->b_lblkno = offset; buf->b_bufsize = buflen; - buf->b_edev = vd->dev[slice]; + buf->b_edev = vd->dev[slice]; buf->b_un.b_addr = bufaddr; buf->b_iodone = vd_biodone; @@ -2526,7 +2526,7 @@ vd_complete_bio(vd_task_t *task) * message to the client. * * Parameters: - * arg - opaque pointer to structure containing task to be completed + * arg - opaque pointer to structure containing task to be completed * * Return Values * None @@ -2569,7 +2569,7 @@ vd_notify(vd_task_t *task) * the vDisk client * * Parameters: - * task - structure containing the request sent from client + * task - structure containing the request sent from client * * Return Values * None @@ -2624,7 +2624,7 @@ vd_complete_notify(vd_task_t *task) * message to the client that the request is completed. * * Parameters: - * arg - opaque pointer to structure containing task to be completed + * arg - opaque pointer to structure containing task to be completed * * Return Values * None @@ -3134,6 +3134,7 @@ vd_do_slice_ioctl(vd_t *vd, int cmd, void *ioctl_arg) return (EIO); } + /* FALLTHROUGH */ default: /* Unknown disk label type */ return (ENOTSUP); @@ -3578,7 +3579,7 @@ vd_do_ioctl(vd_t *vd, vd_dring_payload_t *request, void* buf, vd_ioctl_t *ioctl) * is passed in as a field in the task pointer. * * Parameters: - * arg - opaque pointer to structure containing task to be completed + * arg - opaque pointer to structure containing task to be completed * * Return Values * None @@ -3688,7 +3689,8 @@ vd_ioctl(vd_task_t *task) break; } } - ASSERT(i < nioctls); /* because "operation" already validated */ + + VERIFY(i < nioctls); /* because "operation" already validated */ if (!(vd->open_flags & FWRITE) && ioctl[i].write) { PR0("%s fails because backend is opened read-only", @@ -3890,7 +3892,7 @@ vd_get_access(vd_task_t *task) } request->status = ldi_ioctl(vd->ldi_handle[request->slice], MHIOCSTATUS, - NULL, (vd->open_flags | FKIOCTL), kcred, &rval); + (intptr_t)NULL, (vd->open_flags | FKIOCTL), kcred, &rval); if (request->status != 0) return (0); @@ -3935,8 +3937,8 @@ vd_set_access(vd_task_t *task) if (flags == VD_ACCESS_SET_CLEAR) { PR0("Performing VD_OP_SET_ACCESS (CLEAR)"); request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCRELEASE, NULL, (vd->open_flags | FKIOCTL), kcred, - &rval); + MHIOCRELEASE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); if (request->status == 0) vd->ownership = B_FALSE; return (0); @@ -3962,7 +3964,8 @@ vd_set_access(vd_task_t *task) */ PR0("Performing VD_OP_SET_ACCESS (EXCLUSIVE|PREEMPT|PRESERVE)"); request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCTKOWN, NULL, (vd->open_flags | FKIOCTL), kcred, &rval); + MHIOCTKOWN, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); break; case VD_ACCESS_SET_PRESERVE: @@ -3977,12 +3980,13 @@ vd_set_access(vd_task_t *task) */ PR0("Performing VD_OP_SET_ACCESS (EXCLUSIVE|PRESERVE)"); request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCQRESERVE, NULL, (vd->open_flags | FKIOCTL), kcred, - &rval); + MHIOCQRESERVE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); if (request->status != 0) break; request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCTKOWN, NULL, (vd->open_flags | FKIOCTL), kcred, &rval); + MHIOCTKOWN, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); break; case VD_ACCESS_SET_PREEMPT: @@ -3994,8 +3998,8 @@ vd_set_access(vd_task_t *task) */ PR0("Performing VD_OP_SET_ACCESS (EXCLUSIVE|PREEMPT)"); request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCQRESERVE, NULL, (vd->open_flags | FKIOCTL), kcred, - &rval); + MHIOCQRESERVE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); if (request->status == 0) break; @@ -4004,16 +4008,16 @@ vd_set_access(vd_task_t *task) /* try again even if the reset has failed */ request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCQRESERVE, NULL, (vd->open_flags | FKIOCTL), kcred, - &rval); + MHIOCQRESERVE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); break; case 0: /* Flag EXCLUSIVE only. Just issue a SCSI reservation */ PR0("Performing VD_OP_SET_ACCESS (EXCLUSIVE)"); request->status = ldi_ioctl(vd->ldi_handle[request->slice], - MHIOCQRESERVE, NULL, (vd->open_flags | FKIOCTL), kcred, - &rval); + MHIOCQRESERVE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), + kcred, &rval); break; } @@ -4034,7 +4038,7 @@ vd_reset_access(vd_t *vd) return; PR0("Releasing disk ownership"); - status = ldi_ioctl(vd->ldi_handle[0], MHIOCRELEASE, NULL, + status = ldi_ioctl(vd->ldi_handle[0], MHIOCRELEASE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), kcred, &rval); /* @@ -4059,7 +4063,7 @@ vd_reset_access(vd_t *vd) PR0("Fail to reset disk, error %d", status); /* whatever the result of the reset is, we try the release again */ - status = ldi_ioctl(vd->ldi_handle[0], MHIOCRELEASE, NULL, + status = ldi_ioctl(vd->ldi_handle[0], MHIOCRELEASE, (intptr_t)NULL, (vd->open_flags | FKIOCTL), kcred, &rval); if (status == 0 || status == EACCES) { @@ -4081,7 +4085,7 @@ vd_reset_access(vd_t *vd) if (vd_reset_access_failure == A_REBOOT) { cmn_err(CE_WARN, VD_RESET_ACCESS_FAILURE_MSG ", rebooting the system", vd->device_path); - (void) uadmin(A_SHUTDOWN, AD_BOOT, NULL); + (void) uadmin(A_SHUTDOWN, AD_BOOT, (uintptr_t)NULL); } else if (vd_reset_access_failure == A_DUMP) { panic(VD_RESET_ACCESS_FAILURE_MSG, vd->device_path); } @@ -4122,7 +4126,7 @@ static const size_t vds_noperations = * Process a task specifying a client I/O request * * Parameters: - * task - structure containing the request sent from client + * task - structure containing the request sent from client * * Return Value * 0 - success @@ -4196,7 +4200,7 @@ vd_do_process_task(vd_task_t *task) * by the completion handler. * * Parameters: - * task - structure containing the request sent from client + * task - structure containing the request sent from client * * Return Value * 0 - successful synchronous request. @@ -5415,7 +5419,7 @@ vds_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) kmem_free(vds->ispecp->specp, sizeof (vds_prop_template)); kmem_free(vds->ispecp, sizeof (mdeg_node_spec_t)); vds->ispecp = NULL; - vds->mdeg = NULL; + vds->mdeg = 0; } vds_driver_types_free(vds); @@ -5720,8 +5724,8 @@ vd_setup_partition_vtoc(vd_t *vd) &size, &unit); /* - * Set some attributes of the geometry to what format(1m) uses - * so that writing a default label using format(1m) does not + * Set some attributes of the geometry to what format(8) uses + * so that writing a default label using format(8) does not * produce any error. */ vd->dk_geom.dkg_bcyl = 0; @@ -5730,7 +5734,7 @@ vd_setup_partition_vtoc(vd_t *vd) vd->dk_geom.dkg_read_reinstruct = 0; /* - * We must have a correct label name otherwise format(1m) will + * We must have a correct label name otherwise format(8) will * not recognized the disk as labeled. */ (void) snprintf(vd->vtoc.v_asciilabel, LEN_DKL_ASCII, @@ -5884,7 +5888,7 @@ vd_setup_partition_efi(vd_t *vd) static int vd_setup_backend_vnode(vd_t *vd) { - int rval, status; + int rval, status; dev_t dev; char *file_path = vd->device_path; ldi_handle_t lhandle; @@ -6059,7 +6063,7 @@ vd_setup_disk_image(vd_t *vd) */ PR1("creating devid for %s", backend_path); - if (ddi_devid_init(vd->vds->dip, DEVID_FAB, NULL, 0, + if (ddi_devid_init(vd->vds->dip, DEVID_FAB, 0, 0, &vd->dskimg_devid) != DDI_SUCCESS) { PR0("fail to create devid for %s", backend_path); vd->dskimg_devid = NULL; @@ -6085,10 +6089,10 @@ vd_setup_disk_image(vd_t *vd) /* * Description: - * Open a device using its device path (supplied by ldm(1m)) + * Open a device using its device path (supplied by ldm(8)) * * Parameters: - * vd - pointer to structure containing the vDisk info + * vd - pointer to structure containing the vDisk info * flags - open flags * * Return Value @@ -6491,7 +6495,7 @@ vd_backend_check_size(vd_t *vd) * a disk device or a volume device. * * Parameters: - * vd - pointer to structure containing the vDisk info + * vd - pointer to structure containing the vDisk info * dtype - return the driver type of the device * * Return Value @@ -6565,7 +6569,7 @@ vd_setup_vd(vd_t *vd) { int status, drv_type, pseudo; dev_info_t *dip; - vnode_t *vnp; + vnode_t *vnp; char *path = vd->device_path; char tq_name[TASKQ_NAMELEN]; @@ -7066,7 +7070,7 @@ vds_get_ldc_id(md_t *md, mde_cookie_t vd_node, uint64_t *ldc_id) * vds_get_options * * Description: - * Parse the options of a vds node. Options are defined as an array + * Parse the options of a vds node. Options are defined as an array * of strings in the vds-block-device-opts property of the vds node * in the machine description. Options are returned as a bitmask. The * mapping between the bitmask options and the options strings from the diff --git a/usr/src/uts/sun4v/io/vlds.c b/usr/src/uts/sun4v/io/vlds.c index a33978680e..e630328f0d 100644 --- a/usr/src/uts/sun4v/io/vlds.c +++ b/usr/src/uts/sun4v/io/vlds.c @@ -327,7 +327,7 @@ vlds_attach(dev_info_t *devi, ddi_attach_cmd_t cmd) } if (ddi_create_minor_node(devi, VLDS_NAME, S_IFCHR, - 0, DDI_PSEUDO, NULL) == DDI_FAILURE) { + 0, DDI_PSEUDO, 0) == DDI_FAILURE) { ddi_remove_minor_node(devi, NULL); return (DDI_FAILURE); } diff --git a/usr/src/uts/sun4v/io/vnet.c b/usr/src/uts/sun4v/io/vnet.c index 96fb04175d..376d1ce3e9 100644 --- a/usr/src/uts/sun4v/io/vnet.c +++ b/usr/src/uts/sun4v/io/vnet.c @@ -282,7 +282,7 @@ uint32_t vnet_mac_open_retries = 100; static char macaddr_propname[] = "local-mac-address"; /* - * This is the string displayed by modinfo(1m). + * This is the string displayed by modinfo(8). */ static char vnet_ident[] = "vnet driver"; extern struct mod_ops mod_driverops; @@ -2481,7 +2481,7 @@ vnet_rx_ring_stat(mac_ring_driver_t rdriver, uint_t stat, uint64_t *val) macp = &vresp->macreg; cbp = macp->m_callbacks; - cbp->mc_getstat(macp->m_driver, stat, val); + (void) cbp->mc_getstat(macp->m_driver, stat, val); return (0); } diff --git a/usr/src/uts/sun4v/io/vnet_dds_hcall.s b/usr/src/uts/sun4v/io/vnet_dds_hcall.s index 85ff51c03a..7f813968ad 100644 --- a/usr/src/uts/sun4v/io/vnet_dds_hcall.s +++ b/usr/src/uts/sun4v/io/vnet_dds_hcall.s @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Hypervisor calls called by niu leaf driver. */ @@ -43,35 +41,6 @@ #define N2NIU_VRTX_SET_INO 0x151 -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -vdds_hv_niu_vr_getinfo(uint32_t cookie, uint64_t *real_start, uint64_t *size) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -vdds_hv_niu_vr_get_rxmap(uint32_t cookie, uint64_t *dma_map) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -vdds_hv_niu_vr_get_txmap(uint32_t cookie, uint64_t *dma_map) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -vdds_hv_niu_vrtx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -vdds_hv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino) -{ return (0); } - -#else /* lint || __lint */ - /* * vdds_hv_niu_vr_getinfo(uint32_t cookie, uint64_t &real_start, * uint64_t &size) @@ -128,4 +97,3 @@ vdds_hv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino) nop SET_SIZE(vdds_hv_niu_vrtx_set_ino) -#endif /* lint || __lint */ diff --git a/usr/src/uts/sun4v/io/vnet_gen.c b/usr/src/uts/sun4v/io/vnet_gen.c index c872b641c6..ae89f44a33 100644 --- a/usr/src/uts/sun4v/io/vnet_gen.c +++ b/usr/src/uts/sun4v/io/vnet_gen.c @@ -297,7 +297,7 @@ static char vgen_linkprop_propname[] = "linkprop"; * 1.3 VLAN and HybridIO support. * 1.4 Jumbo Frame support. * 1.5 Link State Notification support with optional support - * for Physical Link information. + * for Physical Link information. * 1.6 Support for RxDringData mode. */ static vgen_ver_t vgen_versions[VGEN_NUM_VER] = { {1, 6} }; @@ -697,7 +697,7 @@ vgen_tx(void *arg, mblk_t *mp) */ static mblk_t * vgen_vlan_frame_fixtag(vgen_port_t *portp, mblk_t *mp, boolean_t is_tagged, - uint16_t vid) + uint16_t vid) { vgen_t *vgenp; boolean_t dst_tagged; @@ -781,8 +781,8 @@ vgen_portsend(vgen_port_t *portp, mblk_t *mp) vgen_ldc_t *ldcp; int status; int rv = VGEN_SUCCESS; - vgen_t *vgenp = portp->vgenp; - vnet_t *vnetp = vgenp->vnetp; + vgen_t *vgenp; + vnet_t *vnetp; boolean_t is_tagged; boolean_t dec_refcnt = B_FALSE; uint16_t vlan_id; @@ -792,6 +792,9 @@ vgen_portsend(vgen_port_t *portp, mblk_t *mp) return (VGEN_FAILURE); } + vgenp = portp->vgenp; + vnetp = vgenp->vnetp; + if (portp->use_vsw_port) { (void) atomic_inc_32(&vgenp->vsw_port_refcnt); portp = portp->vgenp->vsw_portp; @@ -1396,8 +1399,8 @@ vgen_readmd_exit: */ static void vgen_vlan_read_ids(void *arg, int type, md_t *mdp, mde_cookie_t node, - uint16_t *pvidp, uint16_t **vidspp, uint16_t *nvidsp, - uint16_t *default_idp) + uint16_t *pvidp, uint16_t **vidspp, uint16_t *nvidsp, + uint16_t *default_idp) { vgen_t *vgenp; vnet_t *vnetp; @@ -1686,7 +1689,7 @@ vgen_mtu_read(vgen_t *vgenp, md_t *mdp, mde_cookie_t node, uint32_t *mtu) static void vgen_linkprop_read(vgen_t *vgenp, md_t *mdp, mde_cookie_t node, - boolean_t *pls) + boolean_t *pls) { int rv; uint64_t val; @@ -1714,8 +1717,8 @@ vgen_mdeg_reg(vgen_t *vgenp) mdeg_node_spec_t *parentp; uint_t templatesz; int rv; - mdeg_handle_t dev_hdl = NULL; - mdeg_handle_t port_hdl = NULL; + mdeg_handle_t dev_hdl = 0; + mdeg_handle_t port_hdl = 0; templatesz = sizeof (vgen_prop_template); pspecp = kmem_zalloc(templatesz, KM_NOSLEEP); @@ -1767,7 +1770,7 @@ vgen_mdeg_reg(vgen_t *vgenp) return (DDI_SUCCESS); mdeg_reg_fail: - if (dev_hdl != NULL) { + if (dev_hdl != 0) { (void) mdeg_unregister(dev_hdl); } KMEM_FREE(parentp); @@ -1780,13 +1783,13 @@ mdeg_reg_fail: static void vgen_mdeg_unreg(vgen_t *vgenp) { - if (vgenp->mdeg_dev_hdl != NULL) { + if (vgenp->mdeg_dev_hdl != 0) { (void) mdeg_unregister(vgenp->mdeg_dev_hdl); - vgenp->mdeg_dev_hdl = NULL; + vgenp->mdeg_dev_hdl = 0; } - if (vgenp->mdeg_port_hdl != NULL) { + if (vgenp->mdeg_port_hdl != 0) { (void) mdeg_unregister(vgenp->mdeg_port_hdl); - vgenp->mdeg_port_hdl = NULL; + vgenp->mdeg_port_hdl = 0; } if (vgenp->mdeg_parentp != NULL) { @@ -1803,7 +1806,7 @@ vgen_mdeg_port_cb(void *cb_argp, mdeg_result_t *resp) { int idx; int vsw_idx = -1; - uint64_t val; + uint64_t val; vgen_t *vgenp; if ((resp == NULL) || (cb_argp == NULL)) { @@ -2108,7 +2111,7 @@ vgen_add_port(vgen_t *vgenp, md_t *mdp, mde_cookie_t mdex) /* read properties of the port from its md node */ static int vgen_port_read_props(vgen_port_t *portp, vgen_t *vgenp, md_t *mdp, - mde_cookie_t mdex) + mde_cookie_t mdex) { uint64_t port_num; uint64_t *ldc_ids; @@ -2362,7 +2365,7 @@ vgen_port_detach_mdeg(vgen_port_t *portp) static int vgen_update_port(vgen_t *vgenp, md_t *curr_mdp, mde_cookie_t curr_mdex, - md_t *prev_mdp, mde_cookie_t prev_mdex) + md_t *prev_mdp, mde_cookie_t prev_mdex) { uint64_t cport_num; uint64_t pport_num; @@ -2454,10 +2457,10 @@ vgen_port_stat(vgen_port_t *portp, uint_t stat) static int vgen_ldc_attach(vgen_port_t *portp, uint64_t ldc_id) { - vgen_t *vgenp; - vgen_ldc_t *ldcp; - ldc_attr_t attr; - int status; + vgen_t *vgenp; + vgen_ldc_t *ldcp; + ldc_attr_t attr; + int status; ldc_status_t istatus; char kname[MAXNAMELEN]; int instance; @@ -2567,7 +2570,7 @@ static void vgen_ldc_detach(vgen_ldc_t *ldcp) { vgen_port_t *portp; - vgen_t *vgenp; + vgen_t *vgenp; ASSERT(ldcp != NULL); @@ -3000,7 +3003,7 @@ vgen_ldc_cb(uint64_t event, caddr_t arg) _NOTE(ARGUNUSED(event)) vgen_ldc_t *ldcp; vgen_t *vgenp; - ldc_status_t istatus; + ldc_status_t istatus; vgen_stats_t *statsp; uint_t ret = LDC_SUCCESS; @@ -3012,7 +3015,7 @@ vgen_ldc_cb(uint64_t event, caddr_t arg) mutex_enter(&ldcp->cblock); statsp->callbacks++; - if ((ldcp->ldc_status == LDC_INIT) || (ldcp->ldc_handle == NULL)) { + if ((ldcp->ldc_status == LDC_INIT) || (ldcp->ldc_handle == 0)) { DWARN(vgenp, ldcp, "status(%d) is LDC_INIT\n", ldcp->ldc_status); mutex_exit(&ldcp->cblock); @@ -3111,8 +3114,8 @@ vgen_handle_evt_read(vgen_ldc_t *ldcp, vgen_caller_t caller) size_t msglen; vgen_t *vgenp = LDC_TO_VGEN(ldcp); vio_msg_tag_t *tagp; - ldc_status_t istatus; - boolean_t has_data; + ldc_status_t istatus; + boolean_t has_data; DBG1(vgenp, ldcp, "enter\n"); @@ -4227,7 +4230,7 @@ vgen_handshake_done(vgen_ldc_t *ldcp) { vgen_t *vgenp = LDC_TO_VGEN(ldcp); uint32_t hphase = ldcp->hphase; - int status = 0; + int status = 0; switch (hphase) { @@ -5724,7 +5727,7 @@ vgen_check_sid(vgen_ldc_t *ldcp, vio_msg_tag_t *tagp) */ static void vgen_init_dring_reg_msg(vgen_ldc_t *ldcp, vio_dring_reg_msg_t *msg, - uint8_t option) + uint8_t option) { vio_msg_tag_t *tagp; diff --git a/usr/src/uts/sun4v/io/vsw.c b/usr/src/uts/sun4v/io/vsw.c index 6ec8f997bd..1c4738d3e6 100644 --- a/usr/src/uts/sun4v/io/vsw.c +++ b/usr/src/uts/sun4v/io/vsw.c @@ -747,7 +747,7 @@ static int vsw_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) { vsw_t **vswpp, *vswp; - int instance; + int instance; instance = ddi_get_instance(dip); vswp = ddi_get_soft_state(vsw_state, instance); @@ -1435,8 +1435,8 @@ mdeg_reg_fail: kmem_free(pspecp, templatesz); kmem_free(inst_specp, sizeof (mdeg_node_spec_t)); - vswp->mdeg_hdl = NULL; - vswp->mdeg_port_hdl = NULL; + vswp->mdeg_hdl = 0; + vswp->mdeg_port_hdl = 0; return (1); } @@ -1446,10 +1446,10 @@ vsw_mdeg_unregister(vsw_t *vswp) { D1(vswp, "vsw_mdeg_unregister: enter"); - if (vswp->mdeg_hdl != NULL) + if (vswp->mdeg_hdl != 0) (void) mdeg_unregister(vswp->mdeg_hdl); - if (vswp->mdeg_port_hdl != NULL) + if (vswp->mdeg_port_hdl != 0) (void) mdeg_unregister(vswp->mdeg_port_hdl); if (vswp->inst_spec != NULL) { @@ -1812,8 +1812,8 @@ vsw_get_initial_md_properties(vsw_t *vswp, md_t *mdp, mde_cookie_t node) */ static void vsw_vlan_read_ids(void *arg, int type, md_t *mdp, mde_cookie_t node, - uint16_t *pvidp, vsw_vlanid_t **vidspp, uint16_t *nvidsp, - uint16_t *default_idp) + uint16_t *pvidp, vsw_vlanid_t **vidspp, uint16_t *nvidsp, + uint16_t *default_idp) { vsw_t *vswp; vsw_port_t *portp; @@ -2054,7 +2054,7 @@ vsw_mtu_update(vsw_t *vswp, uint32_t mtu) static void vsw_linkprop_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node, - boolean_t *pls) + boolean_t *pls) { int rv; uint64_t val; @@ -2134,7 +2134,7 @@ vsw_update_md_prop(vsw_t *vswp, md_t *mdp, mde_cookie_t node) uint_t ddi_instance; uint8_t new_smode; int i; - uint64_t macaddr = 0; + uint64_t macaddr = 0; enum {MD_init = 0x1, MD_physname = 0x2, MD_macaddr = 0x4, @@ -2449,7 +2449,7 @@ fail_update: */ static int vsw_port_read_props(vsw_port_t *portp, vsw_t *vswp, - md_t *mdp, mde_cookie_t *node) + md_t *mdp, mde_cookie_t *node) { uint64_t ldc_id; uint8_t *addrp; @@ -2597,7 +2597,7 @@ vsw_port_add(vsw_t *vswp, md_t *mdp, mde_cookie_t *node) static int vsw_port_update(vsw_t *vswp, md_t *curr_mdp, mde_cookie_t curr_mdex, - md_t *prev_mdp, mde_cookie_t prev_mdex) + md_t *prev_mdp, mde_cookie_t prev_mdex) { uint64_t cport_num; uint64_t pport_num; diff --git a/usr/src/uts/sun4v/io/vsw_ldc.c b/usr/src/uts/sun4v/io/vsw_ldc.c index ee651e692b..099bb2b42d 100644 --- a/usr/src/uts/sun4v/io/vsw_ldc.c +++ b/usr/src/uts/sun4v/io/vsw_ldc.c @@ -279,7 +279,7 @@ extern uint32_t vsw_nrbufs_factor; * 1.3 VLAN and HybridIO support. * 1.4 Jumbo Frame support. * 1.5 Link State Notification support with optional support - * for Physical Link information. + * for Physical Link information. * 1.6 Support for RxDringData mode. */ static ver_sup_t vsw_versions[] = { {1, 6} }; @@ -471,7 +471,7 @@ vsw_port_detach(vsw_t *vswp, int p_instance) void vsw_detach_ports(vsw_t *vswp) { - vsw_port_list_t *plist = &vswp->plist; + vsw_port_list_t *plist = &vswp->plist; vsw_port_t *port = NULL; D1(vswp, "%s: enter", __func__); @@ -562,11 +562,11 @@ vsw_port_delete(vsw_port_t *port) static int vsw_ldc_attach(vsw_port_t *port, uint64_t ldc_id) { - vsw_t *vswp = port->p_vswp; - vsw_ldc_t *ldcp = NULL; - ldc_attr_t attr; + vsw_t *vswp = port->p_vswp; + vsw_ldc_t *ldcp = NULL; + ldc_attr_t attr; ldc_status_t istatus; - int status = DDI_FAILURE; + int status = DDI_FAILURE; char kname[MAXNAMELEN]; enum { PROG_init = 0x0, PROG_callback = 0x1, @@ -719,8 +719,8 @@ ldc_attach_fail: static void vsw_ldc_detach(vsw_ldc_t *ldcp) { - int rv; - vsw_t *vswp = ldcp->ldc_port->p_vswp; + int rv; + vsw_t *vswp = ldcp->ldc_port->p_vswp; int retries = 0; D2(vswp, "%s: detaching channel %lld", __func__, ldcp->ldc_id); @@ -773,7 +773,7 @@ vsw_ldc_detach(vsw_ldc_t *ldcp) (void) ldc_fini(ldcp->ldc_handle); ldcp->ldc_status = LDC_INIT; - ldcp->ldc_handle = NULL; + ldcp->ldc_handle = 0; ldcp->ldc_vswp = NULL; mutex_destroy(&ldcp->msg_thr_lock); @@ -800,7 +800,7 @@ vsw_ldc_detach(vsw_ldc_t *ldcp) static int vsw_ldc_init(vsw_ldc_t *ldcp) { - vsw_t *vswp = ldcp->ldc_vswp; + vsw_t *vswp = ldcp->ldc_vswp; ldc_status_t istatus = 0; int rv; @@ -1238,7 +1238,7 @@ static uint_t vsw_ldc_cb(uint64_t event, caddr_t arg) { vsw_ldc_t *ldcp = (vsw_ldc_t *)arg; - vsw_t *vswp = ldcp->ldc_vswp; + vsw_t *vswp = ldcp->ldc_vswp; D1(vswp, "%s: enter: ldcid (%lld)\n", __func__, ldcp->ldc_id); @@ -1246,7 +1246,7 @@ vsw_ldc_cb(uint64_t event, caddr_t arg) ldcp->ldc_stats.callbacks++; mutex_enter(&ldcp->status_lock); - if ((ldcp->ldc_status == LDC_INIT) || (ldcp->ldc_handle == NULL)) { + if ((ldcp->ldc_status == LDC_INIT) || (ldcp->ldc_handle == 0)) { mutex_exit(&ldcp->status_lock); mutex_exit(&ldcp->ldc_cblock); return (LDC_SUCCESS); @@ -2075,11 +2075,11 @@ void vsw_process_pkt(void *arg) { vsw_ldc_t *ldcp = (vsw_ldc_t *)arg; - vsw_t *vswp = ldcp->ldc_vswp; + vsw_t *vswp = ldcp->ldc_vswp; size_t msglen; vio_msg_tag_t *tagp; uint64_t *ldcmsg; - int rv = 0; + int rv = 0; D1(vswp, "%s enter: ldcid (%lld)\n", __func__, ldcp->ldc_id); @@ -2145,7 +2145,7 @@ vsw_process_pkt(void *arg) */ static void vsw_dispatch_ctrl_task(vsw_ldc_t *ldcp, void *cpkt, vio_msg_tag_t *tagp, - int msglen) + int msglen) { vsw_ctrl_task_t *ctaskp = NULL; vsw_port_t *port = ldcp->ldc_port; @@ -2221,7 +2221,7 @@ vsw_process_ctrl_pkt(void *arg) { vsw_ctrl_task_t *ctaskp = (vsw_ctrl_task_t *)arg; vsw_ldc_t *ldcp = ctaskp->ldcp; - vsw_t *vswp = ldcp->ldc_vswp; + vsw_t *vswp = ldcp->ldc_vswp; vio_msg_tag_t tag; uint16_t env; @@ -2305,7 +2305,7 @@ void vsw_process_ctrl_ver_pkt(vsw_ldc_t *ldcp, void *pkt) { vio_ver_msg_t *ver_pkt; - vsw_t *vswp = ldcp->ldc_vswp; + vsw_t *vswp = ldcp->ldc_vswp; D1(vswp, "%s(%lld): enter", __func__, ldcp->ldc_id); @@ -3362,7 +3362,7 @@ vsw_process_physlink_msg(vsw_ldc_t *ldcp, void *pkt) static void vsw_process_data_pkt(vsw_ldc_t *ldcp, void *dpkt, vio_msg_tag_t *tagp, - uint32_t msglen) + uint32_t msglen) { uint16_t env = tagp->vio_subtype_env; vsw_t *vswp = ldcp->ldc_vswp; @@ -3747,7 +3747,7 @@ vsw_portsend(vsw_port_t *port, mblk_t *mp) { mblk_t *mpt; int count; - vsw_ldc_t *ldcp = port->ldcp; + vsw_ldc_t *ldcp = port->ldcp; int status = 0; count = vsw_vlan_frame_untag(port, VSW_VNETPORT, &mp, &mpt); @@ -3763,7 +3763,7 @@ vsw_portsend(vsw_port_t *port, mblk_t *mp) * priority frames is also counted and returned. * * Params: - * vswp: pointer to the instance of vsw + * vswp: pointer to the instance of vsw * np: head of packet chain to be broken * npt: tail of packet chain to be broken * @@ -3775,7 +3775,7 @@ vsw_portsend(vsw_port_t *port, mblk_t *mp) */ static uint32_t vsw_get_pri_packets(vsw_t *vswp, mblk_t **np, mblk_t **npt, - mblk_t **hp, mblk_t **hpt) + mblk_t **hp, mblk_t **hpt) { mblk_t *tmp = NULL; mblk_t *smp = NULL; @@ -3840,7 +3840,7 @@ vsw_get_pri_packets(vsw_t *vswp, mblk_t **np, mblk_t **npt, static int vsw_ldctx_pri(void *arg, mblk_t *mp, mblk_t *mpt, uint32_t count) { - vsw_ldc_t *ldcp = (vsw_ldc_t *)arg; + vsw_ldc_t *ldcp = (vsw_ldc_t *)arg; mblk_t *tmp; mblk_t *smp; mblk_t *hmp; /* high prio pkts head */ @@ -3884,7 +3884,7 @@ vsw_ldctx_pri(void *arg, mblk_t *mp, mblk_t *mpt, uint32_t count) static int vsw_ldctx(void *arg, mblk_t *mp, mblk_t *mpt, uint32_t count) { - vsw_ldc_t *ldcp = (vsw_ldc_t *)arg; + vsw_ldc_t *ldcp = (vsw_ldc_t *)arg; mblk_t *tmp = NULL; ASSERT(count != 0); @@ -3952,7 +3952,7 @@ vsw_ldcsend_pkt(vsw_ldc_t *ldcp, mblk_t *mp) vgen_stats_t *statsp = &ldcp->ldc_stats; if ((!(ldcp->lane_out.lstate & VSW_LANE_ACTIVE)) || - (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == NULL)) { + (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == 0)) { (void) atomic_inc_32(&statsp->tx_pri_fail); DWARN(vswp, "%s(%lld) status(%d) lstate(0x%llx), dropping " "packet\n", __func__, ldcp->ldc_id, ldcp->ldc_status, @@ -4121,7 +4121,7 @@ vsw_descrsend(vsw_ldc_t *ldcp, mblk_t *mp) ASSERT(mp != NULL); if ((!(ldcp->lane_out.lstate & VSW_LANE_ACTIVE)) || - (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == NULL)) { + (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == 0)) { DERR(vswp, "%s(%lld) status(%d) state (0x%llx), dropping pkt", __func__, ldcp->ldc_id, ldcp->ldc_status, ldcp->lane_out.lstate); @@ -4566,7 +4566,7 @@ vsw_map_dring_cmn(vsw_ldc_t *ldcp, vio_dring_reg_msg_t *dring_pkt) return (dp); fail: - if (dp->dring_handle != NULL) { + if (dp->dring_handle != 0) { (void) ldc_mem_dring_unmap(dp->dring_handle); } kmem_free(dp, sizeof (*dp)); @@ -4836,9 +4836,9 @@ display_state(void) { vsw_t *vswp; vsw_port_list_t *plist; - vsw_port_t *port; - vsw_ldc_t *ldcp; - extern vsw_t *vsw_head; + vsw_port_t *port; + vsw_ldc_t *ldcp; + extern vsw_t *vsw_head; cmn_err(CE_NOTE, "***** system state *****"); diff --git a/usr/src/uts/sun4v/io/vsw_rxdring.c b/usr/src/uts/sun4v/io/vsw_rxdring.c index 5661a00bd8..adbed65efc 100644 --- a/usr/src/uts/sun4v/io/vsw_rxdring.c +++ b/usr/src/uts/sun4v/io/vsw_rxdring.c @@ -415,7 +415,7 @@ vsw_destroy_rx_dring(vsw_ldc_t *ldcp) } /* Finally, free the receive descriptor ring */ - if (dp->dring_handle != NULL) { + if (dp->dring_handle != 0) { (void) ldc_mem_dring_unbind(dp->dring_handle); (void) ldc_mem_dring_destroy(dp->dring_handle); } @@ -491,7 +491,7 @@ vsw_map_tx_dring(vsw_ldc_t *ldcp, void *pkt) return (dp); fail: - if (dp->dring_handle != NULL) { + if (dp->dring_handle != 0) { (void) ldc_mem_dring_unmap(dp->dring_handle); } kmem_free(dp, sizeof (*dp)); @@ -512,10 +512,10 @@ vsw_unmap_tx_dring(vsw_ldc_t *ldcp) } /* Unmap tx data area and free data handle */ - if (dp->data_handle != NULL) { + if (dp->data_handle != 0) { (void) ldc_mem_unmap(dp->data_handle); (void) ldc_mem_free_handle(dp->data_handle); - dp->data_handle = NULL; + dp->data_handle = 0; } /* Free tx data area cookies */ @@ -527,9 +527,9 @@ vsw_unmap_tx_dring(vsw_ldc_t *ldcp) } /* Unmap peer's dring */ - if (dp->dring_handle != NULL) { + if (dp->dring_handle != 0) { (void) ldc_mem_dring_unmap(dp->dring_handle); - dp->dring_handle = NULL; + dp->dring_handle = 0; } mutex_destroy(&dp->txlock); @@ -877,7 +877,7 @@ vsw_dringsend_shm(vsw_ldc_t *ldcp, mblk_t *mp) vsw_t *vswp = ldcp->ldc_vswp; if ((!(lane_in->lstate & VSW_LANE_ACTIVE)) || - (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == NULL)) { + (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == 0)) { DWARN(vswp, "%s(%lld) status(%d) lstate(0x%llx), dropping " "packet\n", __func__, ldcp->ldc_id, ldcp->ldc_status, lane_in->lstate); diff --git a/usr/src/uts/sun4v/io/vsw_txdring.c b/usr/src/uts/sun4v/io/vsw_txdring.c index afe0e5b6e5..26a9a401a9 100644 --- a/usr/src/uts/sun4v/io/vsw_txdring.c +++ b/usr/src/uts/sun4v/io/vsw_txdring.c @@ -394,7 +394,7 @@ vsw_destroy_tx_dring(vsw_ldc_t *ldcp) */ for (i = 0; i < vsw_num_descriptors; i++) { paddr = (vsw_private_desc_t *)dp->priv_addr + i; - if (paddr->memhandle != NULL) { + if (paddr->memhandle != 0) { if (paddr->bound == 1) { if (ldc_mem_unbind_handle( paddr->memhandle) != 0) { @@ -414,7 +414,7 @@ vsw_destroy_tx_dring(vsw_ldc_t *ldcp) "at pos %d", dp, i); continue; } - paddr->memhandle = NULL; + paddr->memhandle = 0; } mutex_destroy(&paddr->dstate_lock); } @@ -425,7 +425,7 @@ vsw_destroy_tx_dring(vsw_ldc_t *ldcp) /* * Now unbind and destroy the ring itself. */ - if (dp->dring_handle != NULL) { + if (dp->dring_handle != 0) { (void) ldc_mem_dring_unbind(dp->dring_handle); (void) ldc_mem_dring_destroy(dp->dring_handle); } @@ -505,7 +505,7 @@ vsw_unmap_rx_dring(vsw_ldc_t *ldcp) vsw_destroy_rxpools, fvmp, DDI_SLEEP); } - if (dp->dring_handle != NULL) { + if (dp->dring_handle != 0) { (void) ldc_mem_dring_unmap(dp->dring_handle); } kmem_free(dp, sizeof (dring_info_t)); @@ -800,7 +800,7 @@ vsw_dringsend(vsw_ldc_t *ldcp, mblk_t *mp) /* TODO: make test a macro */ if ((!(ldcp->lane_out.lstate & VSW_LANE_ACTIVE)) || - (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == NULL)) { + (ldcp->ldc_status != LDC_UP) || (ldcp->ldc_handle == 0)) { DWARN(vswp, "%s(%lld) status(%d) lstate(0x%llx), dropping " "packet\n", __func__, ldcp->ldc_id, ldcp->ldc_status, ldcp->lane_out.lstate); @@ -942,7 +942,7 @@ vsw_dringsend_free_exit: */ int vsw_dring_find_free_desc(dring_info_t *dringp, - vsw_private_desc_t **priv_p, int *idx) + vsw_private_desc_t **priv_p, int *idx) { vsw_private_desc_t *addr = NULL; int num = vsw_num_descriptors; diff --git a/usr/src/uts/sun4v/iospc/Makefile b/usr/src/uts/sun4v/iospc/Makefile index 95796ada32..ddea6d126f 100644 --- a/usr/src/uts/sun4v/iospc/Makefile +++ b/usr/src/uts/sun4v/iospc/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = iospc OBJECTS = $(IOSPC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(IOSPC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io/iospc @@ -52,22 +51,17 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) CFLAGS += -dalign -DMODULE_NAME=\"$(MODULE)\" -LINTFLAGS += -DMODULE_NAME=\"$(MODULE)\" # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ds +LDFLAGS += -Nmisc/ds INC_PATH += -I$(UTSBASE)/sun4v/io/iospc @@ -85,12 +79,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/kt/Makefile b/usr/src/uts/sun4v/kt/Makefile index f4721ae345..4d2d27ba15 100644 --- a/usr/src/uts/sun4v/kt/Makefile +++ b/usr/src/uts/sun4v/kt/Makefile @@ -37,7 +37,6 @@ UTSBASE = ../.. # MODULE = SPARC-T3 OBJECTS = $(NIAGARA2CPU_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NIAGARA2CPU_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE) CPU_DIR = . @@ -57,13 +56,9 @@ CLEANFILES += $(CPULIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = def $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) -DKT_IMPL +CFLAGS += -DKT_IMPL # # The ATOMIC_BO_ENABLE_SHIFT enables backoff in atomic routines. @@ -95,12 +90,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(CPULIB): $(OBJECTS) diff --git a/usr/src/uts/sun4v/kt_pcbe/Makefile b/usr/src/uts/sun4v/kt_pcbe/Makefile index 535a4bd028..fedb90e667 100644 --- a/usr/src/uts/sun4v/kt_pcbe/Makefile +++ b/usr/src/uts/sun4v/kt_pcbe/Makefile @@ -31,7 +31,6 @@ UTSBASE = ../.. # MODULE = pcbe.SPARC-T3 OBJECTS = $(N2_PCBE_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(N2_PCBE_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_PCBE_DIR)/$(MODULE) # @@ -43,13 +42,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets. # ALL_TARGET = $(BINARY) -LINT_MODULE = kt_pcbe -LINT_TARGET = $(LINT_MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += -DKT_IMPL # @@ -71,12 +65,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ldc/Makefile b/usr/src/uts/sun4v/ldc/Makefile index f1c044bb36..4e4aaba6d4 100644 --- a/usr/src/uts/sun4v/ldc/Makefile +++ b/usr/src/uts/sun4v/ldc/Makefile @@ -42,7 +42,6 @@ UTSBASE = ../.. # MODULE = ldc OBJECTS = $(LDC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(LDC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -61,23 +60,8 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW - CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-parentheses @@ -94,12 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/maramba/Makefile b/usr/src/uts/sun4v/maramba/Makefile index 54b8ffeb3e..66f030bf7c 100644 --- a/usr/src/uts/sun4v/maramba/Makefile +++ b/usr/src/uts/sun4v/maramba/Makefile @@ -48,12 +48,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -61,12 +57,10 @@ check := TARGET= check # .KEEP_STATE: -modlist: +modlist: def: -lintlib: unix - IMPLEMENTED_PLATFORM = SUNW,T5140 LINKED_PLATFORMS = SUNW,T5240 LINKED_PLATFORMS += SUNW,T5440 @@ -81,7 +75,6 @@ install: $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) install_h check: -lint: clean: diff --git a/usr/src/uts/sun4v/md5/Makefile b/usr/src/uts/sun4v/md5/Makefile index 918c70198b..4d85f10c8f 100644 --- a/usr/src/uts/sun4v/md5/Makefile +++ b/usr/src/uts/sun4v/md5/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = md5 OBJECTS = $(MD5_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(MD5_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CRYPTO_DIR)/$(MODULE) ROOTLINK = $(ROOT_PSM_MISC_DIR)/$(MODULE) @@ -52,12 +51,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # @@ -68,7 +63,7 @@ sparc_SPACEFLAG = -W0,-Lt # # md5 depends on the kcf framework # -LDFLAGS += -dy -Nmisc/kcf +LDFLAGS += -Nmisc/kcf # # need extra inline file for here. @@ -88,12 +83,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(ROOTLINK): $(ROOT_PSM_MISC_DIR) $(ROOTMODULE) diff --git a/usr/src/uts/sun4v/mdesc/Makefile b/usr/src/uts/sun4v/mdesc/Makefile index b7b49a01ad..ec0a9c90fc 100644 --- a/usr/src/uts/sun4v/mdesc/Makefile +++ b/usr/src/uts/sun4v/mdesc/Makefile @@ -38,9 +38,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = mdesc +MODULE = mdesc OBJECTS = $(MDESC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(MDESC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io @@ -60,21 +59,21 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-function # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_STATIC_UNUSED # # Default build targets. @@ -89,12 +88,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ml/hcall.s b/usr/src/uts/sun4v/ml/hcall.s index ed4e18b302..fb1b8c83ae 100644 --- a/usr/src/uts/sun4v/ml/hcall.s +++ b/usr/src/uts/sun4v/ml/hcall.s @@ -32,341 +32,6 @@ #include <sys/machparam.h> #include <sys/hypervisor_api.h> -#if defined(lint) || defined(__lint) - -/*ARGSUSED*/ -uint64_t -hv_mach_exit(uint64_t exit_code) -{ return (0); } - -uint64_t -hv_mach_sir(void) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_cpu_start(uint64_t cpuid, uint64_t pc, uint64_t rtba, uint64_t arg) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_cpu_stop(uint64_t cpuid) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_cpu_set_rtba(uint64_t *rtba) -{ return (0); } - -/*ARGSUSED*/ -int64_t -hv_cnputchar(uint8_t ch) -{ return (0); } - -/*ARGSUSED*/ -int64_t -hv_cngetchar(uint8_t *ch) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_tod_get(uint64_t *seconds) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_tod_set(uint64_t seconds) -{ return (0);} - -/*ARGSUSED*/ -uint64_t -hv_mmu_map_perm_addr(void *vaddr, int ctx, uint64_t tte, int flags) -{ return (0); } - -/*ARGSUSED */ -uint64_t -hv_mmu_fault_area_conf(void *raddr) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_mmu_unmap_perm_addr(void *vaddr, int ctx, int flags) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_set_ctx0(uint64_t ntsb_descriptor, uint64_t desc_ra) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_set_ctxnon0(uint64_t ntsb_descriptor, uint64_t desc_ra) -{ return (0); } - -#ifdef SET_MMU_STATS -/*ARGSUSED*/ -uint64_t -hv_mmu_set_stat_area(uint64_t rstatarea, uint64_t size) -{ return (0); } -#endif /* SET_MMU_STATS */ - -/*ARGSUSED*/ -uint64_t -hv_cpu_qconf(int queue, uint64_t paddr, int size) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_devino_to_sysino(uint64_t dev_hdl, uint32_t devino, uint64_t *sysino) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_getvalid(uint64_t sysino, int *intr_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_setvalid(uint64_t sysino, int intr_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_getstate(uint64_t sysino, int *intr_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_setstate(uint64_t sysino, int intr_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_gettarget(uint64_t sysino, uint32_t *cpuid) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvio_intr_settarget(uint64_t sysino, uint32_t cpuid) -{ return (0); } - -uint64_t -hv_cpu_yield(void) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_cpu_state(uint64_t cpuid, uint64_t *cpu_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *minsize) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_mem_scrub(uint64_t real_addr, uint64_t length, uint64_t *scrubbed_len) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_mem_sync(uint64_t real_addr, uint64_t length, uint64_t *flushed_len) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ttrace_buf_conf(uint64_t paddr, uint64_t size, uint64_t *size1) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ttrace_buf_info(uint64_t *paddr, uint64_t *size) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ttrace_enable(uint64_t enable, uint64_t *prev_enable) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ttrace_freeze(uint64_t freeze, uint64_t *prev_freeze) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_mach_desc(uint64_t buffer_ra, uint64_t *buffer_sizep) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ra2pa(uint64_t ra) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_tx_get_state(uint64_t channel, - uint64_t *headp, uint64_t *tailp, uint64_t *state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_rx_get_state(uint64_t channel, - uint64_t *headp, uint64_t *tailp, uint64_t *state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_rx_set_qhead(uint64_t channel, uint64_t head) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_send_msg(uint64_t channel, uint64_t msg_ra) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, uint64_t tbl_entries) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie, - uint64_t raddr, uint64_t length, uint64_t *lengthp) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, uint64_t *cookie) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, uint64_t cookie) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, int *intr_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, int intr_valid_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, int *intr_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, int intr_state) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, uint32_t *cpuid) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, uint32_t cpuid) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_api_get_version(uint64_t api_group, uint64_t *majorp, uint64_t *minorp) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_api_set_version(uint64_t api_group, uint64_t major, uint64_t minor, - uint64_t *supported_minor) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_tm_enable(uint64_t enable) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_mach_set_watchdog(uint64_t timeout, uint64_t *time_remaining) -{ return (0); } - -/*ARGSUSED*/ -int64_t -hv_cnwrite(uint64_t buf_ra, uint64_t count, uint64_t *retcount) -{ return (0); } - -/*ARGSUSED*/ -int64_t -hv_cnread(uint64_t buf_ra, uint64_t count, int64_t *retcount) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_soft_state_set(uint64_t state, uint64_t string) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_soft_state_get(uint64_t string, uint64_t *state) -{ return (0); }uint64_t -hv_guest_suspend(void) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_tick_set_npt(uint64_t npt) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_stick_set_npt(uint64_t npt) -{ return (0); } - -/*ARGSUSED*/ -uint64_t -hv_reboot_data_set(uint64_t buffer_ra, uint64_t buffer_len) -{ return (0); } - -#else /* lint || __lint */ - /* * int hv_mach_exit(uint64_t exit_code) */ @@ -1298,4 +963,3 @@ hv_reboot_data_set(uint64_t buffer_ra, uint64_t buffer_len) nop SET_SIZE(hv_reboot_data_set) -#endif /* lint || __lint */ diff --git a/usr/src/uts/sun4v/ml/mach_interrupt.s b/usr/src/uts/sun4v/ml/mach_interrupt.s index e49ee12d91..456651cbde 100644 --- a/usr/src/uts/sun4v/ml/mach_interrupt.s +++ b/usr/src/uts/sun4v/ml/mach_interrupt.s @@ -23,12 +23,7 @@ * Use is subject to license terms. */ -#if defined(lint) -#include <sys/types.h> -#include <sys/thread.h> -#else /* lint */ #include "assym.h" -#endif /* lint */ #include <sys/asm_linkage.h> #include <sys/machthread.h> @@ -47,14 +42,6 @@ #include <sys/traptrace.h> #endif /* TRAPTRACE */ -#if defined(lint) - -void -cpu_mondo(void) -{} - -#else /* lint */ - /* * (TT 0x7c, TL>0) CPU Mondo Queue Handler @@ -195,16 +182,6 @@ sfmmu_shctx_cpu_mondo_patch: /* Never Reached */ SET_SIZE(cpu_mondo) -#endif /* lint */ - -#if defined(lint) - -void -dev_mondo(void) -{} - -#else /* lint */ - /* * (TT 0x7d, TL>0) Dev Mondo Queue Handler @@ -344,11 +321,7 @@ dev_mondo(void) /* Never Reached */ SET_SIZE(dev_mondo) -#endif /* lint */ -#if defined(lint) -uint64_t cpu_mondo_inval; -#else /* lint */ .seg ".data" .global cpu_mondo_inval .align 8 @@ -356,17 +329,8 @@ cpu_mondo_inval: .skip 8 .seg ".text" -#endif /* lint */ -#if defined(lint) - -void -resumable_error(void) -{} - -#else /* lint */ - /* * (TT 0x7e, TL>0) Resumeable Error Queue Handler * We keep a shadow copy of the queue in kernel buf. @@ -482,15 +446,6 @@ resumable_error(void) /*NOTREACHED*/ SET_SIZE(resumable_error) -#endif /* lint */ - -#if defined(lint) - -void -nonresumable_error(void) -{} - -#else /* lint */ /* * (TT 0x7f, TL>0) Non-resumeable Error Queue Handler @@ -663,4 +618,3 @@ nonresumable_error(void) /*NOTREACHED*/ SET_SIZE(nonresumable_error) -#endif /* lint */ diff --git a/usr/src/uts/sun4v/ml/mach_locore.s b/usr/src/uts/sun4v/ml/mach_locore.s index c64f3f6e94..1cd4f5cbaf 100644 --- a/usr/src/uts/sun4v/ml/mach_locore.s +++ b/usr/src/uts/sun4v/ml/mach_locore.s @@ -23,13 +23,6 @@ * Use is subject to license terms. */ -#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> @@ -46,13 +39,6 @@ #include <sys/hypervisor_api.h> #include <sys/clock.h> -#if defined(lint) - -#include <sys/thread.h> -#include <sys/time.h> - -#else /* lint */ - #include "assym.h" @@ -182,16 +168,6 @@ availmem: _local_p1275cis: .nword 0 -#endif /* lint */ - -#if defined(lint) - -void -_start(void) -{} - -#else /* lint */ - .seg ".data" .global nwindows, nwin_minus_one, winmask @@ -364,8 +340,6 @@ afsrbuf: .asciz "main returned" .align 4 -#endif /* lint */ - /* * Generic system trap handler. @@ -402,14 +376,6 @@ afsrbuf: * 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) #ifdef DEBUG ! Assert gl == 1 @@ -1047,10 +1013,6 @@ common_rtt: SET_SIZE(priv_rtt) SET_SIZE(ktl0) -#endif /* lint */ - -#ifndef lint - #ifdef DEBUG .seg ".data" .align 4 @@ -1071,27 +1033,18 @@ sys_trap_wrong_pil: 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 */ /* @@ -1101,29 +1054,11 @@ sys_tl1_panic(void) * 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 @@ -1145,20 +1080,10 @@ debug_flush_windows(void) 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 @@ -1177,8 +1102,6 @@ flush_user_windows(void) 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. @@ -1186,14 +1109,6 @@ flush_user_windows(void) * 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? @@ -1219,42 +1134,15 @@ trash_user_windows(void) 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; \ @@ -1497,25 +1385,16 @@ ptl1_panic_tl0: ! ----<-----+ TL:0 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 + * 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 @@ -1580,16 +1459,6 @@ ptl1_recurse_trap: 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() */ @@ -1598,19 +1467,9 @@ ptl1_panic_xt(int arg1, int arg2) 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) ! @@ -1633,7 +1492,6 @@ trace_ptr_panic(void) mov PTL1_BAD_TRACE_PTR, %g1 SET_SIZE(trace_ptr_panic) -#endif /* lint */ #endif /* TRAPTRACE */ /* @@ -1641,15 +1499,6 @@ trace_ptr_panic(void) * 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 @@ -1672,17 +1521,6 @@ client_handler(void *cif_handler, void *arg_array) restore %o0, %g0, %o0 ! delay; result in %o0 SET_SIZE(client_handler) -#endif /* lint */ - -#if defined(lint) - -/*ARGSUSED*/ -void -panic_bad_hcall(uint64_t err, uint64_t hcall) -{} - -#else /* lint */ - .seg ".text" bad_hcall_error: .asciz "hypervisor call 0x%x returned an unexpected error %d" @@ -1703,4 +1541,3 @@ bad_hcall_error: mov %o3, %o7 SET_SIZE(panic_bad_hcall) -#endif /* lint */ diff --git a/usr/src/uts/sun4v/ml/mach_proc_init.s b/usr/src/uts/sun4v/ml/mach_proc_init.s index 20d4d3c3cc..fffb6543d3 100644 --- a/usr/src/uts/sun4v/ml/mach_proc_init.s +++ b/usr/src/uts/sun4v/ml/mach_proc_init.s @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * sun4v processor initialization * @@ -33,9 +31,7 @@ * directly from the hypervisor. i.e. without going through OBP. */ -#if !defined(lint) #include "assym.h" -#endif /* !lint */ #include <sys/asm_linkage.h> #include <sys/hypervisor_api.h> @@ -45,15 +41,6 @@ #include <sys/mmu.h> #include <sys/lpad.h> -#if defined(lint) - -/* ARGSUSED */ -void -mach_cpu_startup(uint64_t rabase, uint64_t memsz) -{} - -#else /* lint */ - /* * %o0 - hcall specified arg (cpuid) * %i0 - real memory base @@ -208,4 +195,3 @@ startup_complete: .global mach_cpu_startup_end mach_cpu_startup_end: -#endif /* lint */ diff --git a/usr/src/uts/sun4v/ml/mach_subr_asm.s b/usr/src/uts/sun4v/ml/mach_subr_asm.s index 89830cb988..2716bf85bd 100644 --- a/usr/src/uts/sun4v/ml/mach_subr_asm.s +++ b/usr/src/uts/sun4v/ml/mach_subr_asm.s @@ -26,12 +26,7 @@ * General machine architecture & implementation specific * assembly language routines. */ -#if defined(lint) -#include <sys/types.h> -#include <sys/t_lock.h> -#else /* lint */ #include "assym.h" -#endif /* lint */ #define CPU_MODULE /* need it for NSEC_SHIFT used by NATIVE_TIME_TO_NSEC() */ @@ -45,14 +40,6 @@ #include <sys/fpras.h> #include <sys/soft_state.h> -#if defined(lint) - -uint64_t -ultra_gettick(void) -{ return (0); } - -#else /* lint */ - /* * This isn't the routine you're looking for. * @@ -67,46 +54,19 @@ ultra_gettick(void) nop SET_SIZE(ultra_gettick) -#endif /* lint */ - -#if defined(lint) -/* ARGSUSED */ -void -set_mmfsa_scratchpad(caddr_t vaddr) -{ } - -#else /* lint */ - ENTRY(set_mmfsa_scratchpad) stxa %o0, [%g0]ASI_SCRATCHPAD retl nop SET_SIZE(set_mmfsa_scratchpad) -#endif /* lint */ - -#if defined(lint) -caddr_t -get_mmfsa_scratchpad() -{ return (0); } - -#else /* lint */ ENTRY(get_mmfsa_scratchpad) ldxa [%g0]ASI_SCRATCHPAD, %o0 retl nop SET_SIZE(get_mmfsa_scratchpad) -#endif /* lint */ - -#if defined(lint) -/* ARGSUSED */ -void -cpu_intrq_unregister_powerdown(uint64_t doneflag_va) -{} - -#else /* lint */ /* * Called from a x-trap at tl1 must use %g1 as arg @@ -169,16 +129,7 @@ cpu_intrq_unregister_powerdown(uint64_t doneflag_va) ba,a 0b SET_SIZE(cpu_intrq_unregister_powerdown) -#endif /* lint */ - -#if defined(lint) -/* ARGSUSED */ -int -getprocessorid(void) -{ return (0); } - -#else /* lint */ /* * Get the processor ID. @@ -191,17 +142,6 @@ getprocessorid(void) nop SET_SIZE(getprocessorid) -#endif /* lint */ - -#if defined(lint) || defined(__lint) - -/* ARGSUSED */ -hrtime_t -tick2ns(hrtime_t tick, uint_t cpuid) -{ return 0; } - -#else /* lint */ - ENTRY_NP(tick2ns) ! ! Use nsec_scale for sun4v which is based on %stick @@ -211,50 +151,16 @@ tick2ns(hrtime_t tick, uint_t cpuid) nop SET_SIZE(tick2ns) -#endif /* lint */ - -#if defined(lint) - -/* ARGSUSED */ -void -set_cmp_error_steering(void) -{} - -#else /* lint */ - ENTRY(set_cmp_error_steering) retl nop SET_SIZE(set_cmp_error_steering) -#endif /* lint */ - -#if defined(lint) - -/* ARGSUSED */ -uint64_t -ultra_getver(void) -{ - return (0); -} - -#else /* lint */ - ENTRY(ultra_getver) retl mov -1, %o0 ! XXXQ no version available SET_SIZE(ultra_getver) -#endif /* lint */ - -#if defined(lint) - -int -fpras_chkfn_type1(void) -{ return 0; } - -#else /* lint */ - /* * Check instructions using just the AX pipelines, designed by * C.B. Liaw of PNP. @@ -414,11 +320,7 @@ fpras_chkfn_type1(void) retl ! 15 mov FPRAS_BADTRAP, %o0 ! 16, how detected SET_SIZE(fpras_chkfn_type1) -#endif /* lint */ -#if defined(lint) -char soft_state_message_strings[SOLARIS_SOFT_STATE_MSG_CNT][SSM_SIZE]; -#else /* lint */ .seg ".data" .global soft_state_message_strings @@ -442,4 +344,3 @@ soft_state_message_strings: .nword 0 .seg ".text" -#endif /* lint */ diff --git a/usr/src/uts/sun4v/ml/mach_xc.s b/usr/src/uts/sun4v/ml/mach_xc.s index a3dfd1e571..52e3645609 100644 --- a/usr/src/uts/sun4v/ml/mach_xc.s +++ b/usr/src/uts/sun4v/ml/mach_xc.s @@ -23,12 +23,7 @@ * Use is subject to license terms. */ -#if defined(lint) -#include <sys/types.h> -#include <sys/cpuvar.h> -#else /*lint */ #include "assym.h" -#endif /* lint */ #include <sys/asm_linkage.h> #include <sys/privregs.h> @@ -42,15 +37,6 @@ #endif /* TRAPTRACE */ -#if defined(lint) - -/* ARGSUSED */ -void -self_xcall(struct cpu *cpu, uint64_t arg1, uint64_t arg2, xcfunc_t *func) -{} - -#else - /* * Entered by the software trap (TT=ST_SELFXCALL, TL>0) thru send_self_xcall(). * Emulate the mondo handler - vec_interrupt(). @@ -104,18 +90,7 @@ self_xcall(struct cpu *cpu, uint64_t arg1, uint64_t arg2, xcfunc_t *func) /* Not Reached */ SET_SIZE(self_xcall) -#endif /* lint */ - #ifdef TRAPTRACE -#if defined(lint) - -/* ARGSUSED */ -void -xc_trace(u_int traptype, cpuset_t *cpu_set, xcfunc_t *func, - uint64_t arg1, uint64_t arg2) -{} - -#else /* lint */ ENTRY(xc_trace) rdpr %pstate, %g1 andn %g1, PSTATE_IE | PSTATE_AM, %g2 @@ -188,22 +163,8 @@ xc_trace(u_int traptype, cpuset_t *cpu_set, xcfunc_t *func, wrpr %g0, %g1, %pstate /* enable interrupts */ SET_SIZE(xc_trace) -#endif /* lint */ #endif /* TRAPTRACE */ -#if defined(lint) - -/*ARGSUSED*/ -void -init_mondo(xcfunc_t *func, uint64_t arg1, uint64_t arg2) -{} - -/*ARGSUSED*/ -int -shipit(int n, uint64_t cpuid) -{ return(0); } - -#else /* lint */ /* * Setup interrupt dispatch data registers * Entry: @@ -241,16 +202,6 @@ shipit(int n, uint64_t cpuid) membar #Sync SET_SIZE(shipit) -#endif /* lint */ - -#if defined(lint) - -/*ARGSUSED*/ -uint64_t -get_cpuaddr(uint64_t reg, uint64_t scr) -{ return (0);} - -#else /* lint */ /* * Get cpu structure * Entry: @@ -263,15 +214,6 @@ get_cpuaddr(uint64_t reg, uint64_t scr) nop SET_SIZE(get_cpuaddr) -#endif /* lint */ - -#if defined(lint) -/* ARGSUSED */ -void -xt_sync_tl1(uint64_t *cpu_sync_addr) -{} - -#else /* lint */ /* * This is to ensure that previously called xtrap handlers have executed on * sun4v. We zero out the byte corresponding to its cpuid in the @@ -286,4 +228,3 @@ xt_sync_tl1(uint64_t *cpu_sync_addr) retry SET_SIZE(xt_sync_tl1) -#endif /* lint */ diff --git a/usr/src/uts/sun4v/ml/trap_table.s b/usr/src/uts/sun4v/ml/trap_table.s index ad781d5fb5..2284ba4596 100644 --- a/usr/src/uts/sun4v/ml/trap_table.s +++ b/usr/src/uts/sun4v/ml/trap_table.s @@ -24,9 +24,7 @@ * Use is subject to license terms. */ -#if !defined(lint) #include "assym.h" -#endif /* !lint */ #include <sys/asm_linkage.h> #include <sys/privregs.h> #include <sys/sun4asi.h> @@ -118,9 +116,7 @@ * NOT is used for traps that just shouldn't happen. * It comes in both single and quadruple flavors. */ -#if !defined(lint) .global trap -#endif /* !lint */ #define NOT \ TT_TRACE(trace_gen) ;\ set trap, %g1 ;\ @@ -154,9 +150,7 @@ * TRAP vectors to the trap() function. * It's main use is for user errors. */ -#if !defined(lint) .global trap -#endif /* !lint */ #define TRAP(arg) \ TT_TRACE(trace_gen) ;\ set trap, %g1 ;\ @@ -273,8 +267,6 @@ clr %o4; clr %o5; clr %o6; clr %o7 ;\ retry; .align 128 -#if !defined(lint) - /* * If we get an unresolved tlb miss while in a window handler, the fault * handler will resume execution at the last instruction of the window @@ -584,8 +576,6 @@ .empty -#endif /* !lint */ - /* * SPILL_mixed spills either size window, depending on * whether %sp is even or odd, to a 32-bit address space. @@ -725,8 +715,6 @@ nop ;\ .align 32 -#if !defined(lint) - /* * ECACHE_ECC error traps at level 0 and level 1 */ @@ -740,8 +728,6 @@ table_name: ;\ sub %g0, 1, %g4 ;\ .align 32 -#endif /* !lint */ - /* * illegal instruction trap */ @@ -1087,13 +1073,6 @@ table_name/**/_itlbmiss: ;\ #endif -#if defined(lint) - -struct scb trap_table; -struct scb scb; /* trap_table/scb are the same object */ - -#else /* lint */ - /* * ======================================================================= * SPARC V9 TRAP TABLE @@ -2897,4 +2876,3 @@ fast_trap_dummy_call: SYSCALL_NOTT(syscall_trap) SET_SIZE(syscall_wrapper) -#endif /* lint */ diff --git a/usr/src/uts/sun4v/ml/wbuf.s b/usr/src/uts/sun4v/ml/wbuf.s index cd8b7a231a..66628268c8 100644 --- a/usr/src/uts/sun4v/ml/wbuf.s +++ b/usr/src/uts/sun4v/ml/wbuf.s @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/asm_linkage.h> #include <sys/machthread.h> #include <sys/privregs.h> @@ -36,7 +34,6 @@ #include <sys/machtrap.h> #include <sys/traptrace.h> -#if !defined(lint) #include "assym.h" /* @@ -513,4 +510,3 @@ mov PTL1_BAD_WTRAP, %g1 SET_SIZE(fault_32bit_not) SET_SIZE(fault_64bit_not) -#endif /* !lint */ diff --git a/usr/src/uts/sun4v/montoya/Makefile b/usr/src/uts/sun4v/montoya/Makefile index 2c09505a4e..736771879e 100644 --- a/usr/src/uts/sun4v/montoya/Makefile +++ b/usr/src/uts/sun4v/montoya/Makefile @@ -45,12 +45,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -58,11 +54,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clobber clean.lint modlist: $(MONTOYA_KMODS) - -lintlib: unix - -modlintlib: $(MONTOYA_KMODS) +def all clean clobber modlist: $(MONTOYA_KMODS) IMPLEMENTED_PLATFORM = SUNW,Netra-CP3060 @@ -78,18 +70,6 @@ $(MONTOYA_KMODS): FRC install_h check: FRC -lint: modlintlib .WAIT $(LINT_DEPS) - -LINT_LIBS = $(LINT_LIB) \ - -L$(MONTOYA_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\n$(IMPLEMENTED_PLATFORM) platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - # # Include common targets. # diff --git a/usr/src/uts/sun4v/montoya/Makefile.montoya b/usr/src/uts/sun4v/montoya/Makefile.montoya index 8ecc44532e..3584c28c9f 100644 --- a/usr/src/uts/sun4v/montoya/Makefile.montoya +++ b/usr/src/uts/sun4v/montoya/Makefile.montoya @@ -54,8 +54,6 @@ USR_MONTOYA_ISYS_DIR = $(USR_MONTOYA_INC_DIR)/sys USR_MONTOYA_SBIN_LINKS = $(USR_MONTOYA_SBIN_DIR)/prtdiag -MONTOYA_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/montoya/lint-libs/$(OBJS_DIR) - # # Define modules. # @@ -80,8 +78,6 @@ include $(UTSBASE)/sun4v/montoya/Makefile.files include $(UTSBASE)/sun4v/Makefile.sun4v MODSTUBS_DIR = $(UNIX_DIR) -LINTS_DIR = $(OBJS_DIR) -LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/montoya/lint-libs/$(OBJS_DIR) # diff --git a/usr/src/uts/sun4v/montoya/Makefile.rules b/usr/src/uts/sun4v/montoya/Makefile.rules index f89017ff7c..e9b9fb1ed6 100644 --- a/usr/src/uts/sun4v/montoya/Makefile.rules +++ b/usr/src/uts/sun4v/montoya/Makefile.rules @@ -21,8 +21,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # # This Makefile defines the build rules for the directory @@ -43,11 +41,3 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/montoya/os/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) - -# -# Section 1b: Lint `object' build rules -# - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/montoya/os/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - diff --git a/usr/src/uts/sun4v/montoya/platmod/Makefile b/usr/src/uts/sun4v/montoya/platmod/Makefile index cb92f7feda..9257c7e61b 100644 --- a/usr/src/uts/sun4v/montoya/platmod/Makefile +++ b/usr/src/uts/sun4v/montoya/platmod/Makefile @@ -41,7 +41,6 @@ UTSBASE = ../../.. # MODULE = platmod OBJECTS = $(MONTOYA_PLATMOD_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(MONTOYA_PLATMOD_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_MONTOYA_MISC_DIR)/$(MODULE) PLAT_DIR = . @@ -61,7 +60,6 @@ CLEANFILES += $(PLATLIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -69,11 +67,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # ALL_BUILDS = $(ALL_BUILDSONLY64) DEF_BUILDS = $(DEF_BUILDSONLY64) -CLEANLINTFILES += $(LINT32_FILES) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # @@ -89,17 +83,10 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) check: -LINT_LIB_DIR = $(MONTOYA_LINT_LIB_DIR) $(PLATLIB): $(OBJECTS) $(BUILD.SO) $(OBJECTS) diff --git a/usr/src/uts/sun4v/n2piupc/Makefile b/usr/src/uts/sun4v/n2piupc/Makefile index c4cd3e1b44..2577303a0b 100644 --- a/usr/src/uts/sun4v/n2piupc/Makefile +++ b/usr/src/uts/sun4v/n2piupc/Makefile @@ -41,7 +41,6 @@ UTSBASE = ../.. # MODULE = n2piupc OBJECTS = $(N2PIUPC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(N2PIUPC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io/n2piupc @@ -54,7 +53,6 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # @@ -62,10 +60,6 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # INC_PATH += -I$(UTSBASE)/sun4v/io/n2piupc -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-label # @@ -74,11 +68,6 @@ CERRWARN += -_gcc=-Wno-unused-label CFLAGS += -dalign -DMODULE_NAME=\"$(MODULE)\" # -# Lint needs module name too -# -LINTFLAGS += -DMODULE_NAME=\"$(MODULE)\" - -# # Default build targets. # .KEEP_STATE: @@ -91,12 +80,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/n2rng/Makefile b/usr/src/uts/sun4v/n2rng/Makefile index ba94b5bdfb..529a485886 100644 --- a/usr/src/uts/sun4v/n2rng/Makefile +++ b/usr/src/uts/sun4v/n2rng/Makefile @@ -40,7 +40,6 @@ COM_DIR = $(COMMONBASE)/crypto # MODULE = n2rng OBJECTS = $(N2RNG_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(N2RNG_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io/n2rng @@ -60,20 +59,15 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) -DN2 -I$(COM_DIR) -LINTFLAGS += -DN2 -I$(COM_DIR) CERRWARN += $(CNOWARN_UNINIT) # # module dependencies # -LDFLAGS += -dy -Nmisc/kcf +LDFLAGS += -Nmisc/kcf # # Default build targets. @@ -88,12 +82,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/niagara/Makefile b/usr/src/uts/sun4v/niagara/Makefile index 713198a991..181c06f9d4 100644 --- a/usr/src/uts/sun4v/niagara/Makefile +++ b/usr/src/uts/sun4v/niagara/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = SUNW,UltraSPARC-T1 OBJECTS = $(NIAGARACPU_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NIAGARACPU_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE) CPU_DIR = . @@ -60,13 +59,9 @@ CLEANFILES += $(CPULIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = def $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) -DNIAGARA_IMPL +CFLAGS += -DNIAGARA_IMPL CERRWARN += -_gcc=-Wno-parentheses # @@ -88,12 +83,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(CPULIB): $(OBJECTS) diff --git a/usr/src/uts/sun4v/niagara2/Makefile b/usr/src/uts/sun4v/niagara2/Makefile index 39a01ef025..f6f4d3843e 100644 --- a/usr/src/uts/sun4v/niagara2/Makefile +++ b/usr/src/uts/sun4v/niagara2/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = SUNW,UltraSPARC-T2 OBJECTS = $(NIAGARA2CPU_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NIAGARA2CPU_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE) CPU_DIR = . @@ -59,13 +58,9 @@ CLEANFILES += $(CPULIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = def $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) -DNIAGARA2_IMPL +CFLAGS += -DNIAGARA2_IMPL # # cpu-module-specific flags @@ -97,12 +92,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(CPULIB): $(OBJECTS) diff --git a/usr/src/uts/sun4v/niagara2_pcbe/Makefile b/usr/src/uts/sun4v/niagara2_pcbe/Makefile index a46d392d16..3baf36dd40 100644 --- a/usr/src/uts/sun4v/niagara2_pcbe/Makefile +++ b/usr/src/uts/sun4v/niagara2_pcbe/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This Makefile builds the UltraSPARC-T2 Performance Counter BackEnd (PCBE). # @@ -34,7 +34,6 @@ UTSBASE = ../.. # MODULE = pcbe.SUNW,UltraSPARC-T2 OBJECTS = $(N2_PCBE_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(N2_PCBE_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_PCBE_DIR)/$(MODULE) # @@ -46,13 +45,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets. # ALL_TARGET = $(BINARY) -LINT_MODULE = niagara2_pcbe -LINT_TARGET = $(LINT_MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += -DNIAGARA2_IMPL # @@ -74,12 +68,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/niagara_pcbe/Makefile b/usr/src/uts/sun4v/niagara_pcbe/Makefile index ddc87ef3a8..5cb3bf8fa8 100644 --- a/usr/src/uts/sun4v/niagara_pcbe/Makefile +++ b/usr/src/uts/sun4v/niagara_pcbe/Makefile @@ -34,7 +34,6 @@ UTSBASE = ../.. # MODULE = pcbe.SUNW,UltraSPARC-T1 OBJECTS = $(NI_PCBE_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NI_PCBE_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_PCBE_DIR)/$(MODULE) # @@ -46,17 +45,13 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets. # ALL_TARGET = $(BINARY) -LINT_MODULE = niagara_pcbe -LINT_TARGET = $(LINT_MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON CERRWARN += -_gcc=-Wno-type-limits @@ -73,12 +68,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/niumx/Makefile b/usr/src/uts/sun4v/niumx/Makefile index 5ebcf02762..1ccab74217 100644 --- a/usr/src/uts/sun4v/niumx/Makefile +++ b/usr/src/uts/sun4v/niumx/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = niumx OBJECTS = $(NIUMX_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NIUMX_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -51,7 +50,6 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -60,7 +58,9 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) INC_PATH += -I$(UTSBASE)/sun4v/io/niumx # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses @@ -84,12 +84,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ntwdt/Makefile b/usr/src/uts/sun4v/ntwdt/Makefile index 5aae3d419a..2685934ffe 100644 --- a/usr/src/uts/sun4v/ntwdt/Makefile +++ b/usr/src/uts/sun4v/ntwdt/Makefile @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the ntwdt driver module. # # sun4v implementation architecture dependent @@ -37,9 +35,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = ntwdt +MODULE = ntwdt OBJECTS = $(NTWDT_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NTWDT_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/io @@ -59,15 +56,9 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # -# lint pass one enforcement -# -CFLAGS += -v - -# # Default build targets. # .KEEP_STATE: @@ -80,12 +71,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/nxge/Makefile b/usr/src/uts/sun4v/nxge/Makefile index 78c316d0be..121feff4d5 100644 --- a/usr/src/uts/sun4v/nxge/Makefile +++ b/usr/src/uts/sun4v/nxge/Makefile @@ -42,7 +42,6 @@ UTSBASE = ../.. MODULE = nxge NXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS) $(NXGE_HCALL_OBJS) OBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%) -LINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/common/io/nxge @@ -62,7 +61,6 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # @@ -77,9 +75,6 @@ INC_PATH += -I$(UTSBASE)/common/io/nxge/npi INC_PATH += -I$(UTSBASE)/common/sys/nxge INC_PATH += -I$(UTSBASE)/sun4v # -# -# lint pass one enforcement -# CFLAGS += -DSOLARIS # NEMO #CFLAGS += -DNEMO @@ -102,26 +97,18 @@ CFLAGS += -DSOLARIS #CFLAGS += -DNIU_HV_WORKAROUND CFLAGS += -DNIU_LP_WORKAROUND -LINTFLAGS += -DSOLARIS -LINTFLAGS += -DNXGE_FM -LINTFLAGS += -DNIU_LP_WORKAROUND -# -# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h -# force us to turn off these lint checks. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW - CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-type-limits +$(OBJS_DIR)/nxge_hw.o := SMOFF += deref_check + # # Driver depends on mac & IP # -LDFLAGS += -dy -N misc/mac -N drv/ip +LDFLAGS += -N misc/mac -N drv/ip # # Default build targets. @@ -136,12 +123,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/obpsym/Makefile b/usr/src/uts/sun4v/obpsym/Makefile index 271e280555..055e1403ef 100644 --- a/usr/src/uts/sun4v/obpsym/Makefile +++ b/usr/src/uts/sun4v/obpsym/Makefile @@ -20,11 +20,10 @@ # CDDL HEADER END # # -# uts/sun4v/obpsym/Makefile # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the obpsym misc kernel # module. @@ -40,7 +39,6 @@ UTSBASE = ../.. # MODULE = obpsym OBJECTS = $(OBPSYM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(OBPSYM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -52,13 +50,9 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) +CFLAGS += $(CCVERBOSE) # # Default build targets. @@ -73,12 +67,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/ontario/Makefile b/usr/src/uts/sun4v/ontario/Makefile index 125df6b498..bc00a7d50b 100644 --- a/usr/src/uts/sun4v/ontario/Makefile +++ b/usr/src/uts/sun4v/ontario/Makefile @@ -45,12 +45,8 @@ install := TARGET= install install_h := TARGET= install_h clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -lintlib := TARGET= lintlib -modlintlib := TARGET= modlintlib modlist := TARGET= modlist modlist := NO_STATE= -K $$MODSTATE$$$$ -clean.lint := TARGET= clean.lint check := TARGET= check # @@ -58,11 +54,7 @@ check := TARGET= check # .KEEP_STATE: -def all clean clobber clean.lint modlist: $(ONTARIO_KMODS) - -lintlib: unix - -modlintlib: $(ONTARIO_KMODS) +def all clean clobber modlist: $(ONTARIO_KMODS) IMPLEMENTED_PLATFORM = SUNW,Sun-Fire-T200 LINKED_PLATFORMS = SUNW,Sun-Fire-T1000 @@ -85,18 +77,6 @@ $(ONTARIO_KMODS): FRC install_h check: FRC -lint: modlintlib .WAIT $(LINT_DEPS) - -LINT_LIBS = $(LINT_LIB) \ - -L$(ONTARIO_LINT_LIB_DIR) \ - -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \ - $(CLOSED_LINT_KMODS:%=-l%) \ - -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%) - -lint.platmod: modlintlib - @-$(ECHO) "\n$(IMPLEMENTED_PLATFORM) platform-dependent module: global crosschecks:" - @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) - # # Include common targets. # diff --git a/usr/src/uts/sun4v/ontario/Makefile.ontario b/usr/src/uts/sun4v/ontario/Makefile.ontario index 6bf4d82ae6..d6ff8f3e21 100644 --- a/usr/src/uts/sun4v/ontario/Makefile.ontario +++ b/usr/src/uts/sun4v/ontario/Makefile.ontario @@ -19,11 +19,10 @@ # CDDL HEADER END # # -# uts/sun4v/ontario/Makefile # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # Global definitions for sun4v ontario implementation specific modules. # @@ -56,9 +55,6 @@ USR_ONTARIO_INC_DIR = $(USR_ONTARIO_DIR)/include USR_ONTARIO_LIB_DIR = $(USR_ONTARIO_DIR)/lib USR_ONTARIO_ISYS_DIR = $(USR_ONTARIO_INC_DIR)/sys - -ONTARIO_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/ontario/lint-libs/$(OBJS_DIR) - # # Define modules. # @@ -83,8 +79,6 @@ include $(UTSBASE)/sun4v/ontario/Makefile.files include $(UTSBASE)/sun4v/Makefile.sun4v MODSTUBS_DIR = $(UNIX_DIR) -LINTS_DIR = $(OBJS_DIR) -LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/ontario/lint-libs/$(OBJS_DIR) # diff --git a/usr/src/uts/sun4v/ontario/Makefile.rules b/usr/src/uts/sun4v/ontario/Makefile.rules index 8ce9d93e3d..f691d78c04 100644 --- a/usr/src/uts/sun4v/ontario/Makefile.rules +++ b/usr/src/uts/sun4v/ontario/Makefile.rules @@ -21,8 +21,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # # This Makefile defines the build rules for the directory @@ -47,13 +45,3 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/ontario/os/%.c $(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/ontario/io/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) - -# -# Section 1b: Lint `object' build rules -# - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/ontario/os/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/ontario/io/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) diff --git a/usr/src/uts/sun4v/ontario/io/tsalarm.c b/usr/src/uts/sun4v/ontario/io/tsalarm.c index ebf15565c8..6f80db8e88 100644 --- a/usr/src/uts/sun4v/ontario/io/tsalarm.c +++ b/usr/src/uts/sun4v/ontario/io/tsalarm.c @@ -410,7 +410,7 @@ tsalarm_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) * the device's softc, is used to direct peculiar behavior. */ if (ddi_create_minor_node(dip, "lom", S_IFCHR, 0, - DDI_PSEUDO, NULL) == DDI_FAILURE) { + DDI_PSEUDO, 0) == DDI_FAILURE) { goto attach_failed; } @@ -544,7 +544,7 @@ FAIL: if (rv != 0) { if (softc->flags & TSAL_OPENED) (void) ldi_close(softc->lh, FREAD|FWRITE, credp); - if (softc->flags * TSAL_IDENTED) + if (softc->flags & TSAL_IDENTED) (void) ldi_ident_release(softc->li); softc->flags &= ~(TSAL_OPENED | TSAL_IDENTED); if (softc->req_ptr != NULL) @@ -749,7 +749,7 @@ glvc_alarm_get(int alarm_type, int *alarm_state, tsalarm_softc_t *sc) req_ptr->alarm_id = alarm_type; send_msg.msg_type = PCP_ALARM_CONTROL; - send_msg.sub_type = NULL; + send_msg.sub_type = 0; send_msg.msg_len = sizeof (tsal_pcp_alarm_req_t); send_msg.msg_data = (uint8_t *)req_ptr; @@ -824,7 +824,7 @@ glvc_alarm_set(int alarm_type, int new_state, tsalarm_softc_t *sc) req_ptr->alarm_id = alarm_type; send_msg.msg_type = PCP_ALARM_CONTROL; - send_msg.sub_type = NULL; + send_msg.sub_type = 0; send_msg.msg_len = sizeof (tsal_pcp_alarm_req_t); send_msg.msg_data = (uint8_t *)req_ptr; diff --git a/usr/src/uts/sun4v/ontario/platmod/Makefile b/usr/src/uts/sun4v/ontario/platmod/Makefile index e4c2f30b46..8ba77ccbc3 100644 --- a/usr/src/uts/sun4v/ontario/platmod/Makefile +++ b/usr/src/uts/sun4v/ontario/platmod/Makefile @@ -41,7 +41,6 @@ UTSBASE = ../../.. # MODULE = platmod OBJECTS = $(ONTARIO_PLATMOD_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(ONTARIO_PLATMOD_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_ONTARIO_MISC_DIR)/$(MODULE) PLAT_DIR = . @@ -61,7 +60,6 @@ CLEANFILES += $(PLATLIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -69,11 +67,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # ALL_BUILDS = $(ALL_BUILDSONLY64) DEF_BUILDS = $(DEF_BUILDSONLY64) -CLEANLINTFILES += $(LINT32_FILES) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # @@ -89,17 +83,10 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) check: -LINT_LIB_DIR =$(ONTARIO_LINT_LIB_DIR) $(PLATLIB): $(OBJECTS) $(BUILD.SO) $(OBJECTS) diff --git a/usr/src/uts/sun4v/ontario/tsalarm/Makefile b/usr/src/uts/sun4v/ontario/tsalarm/Makefile index 8f0a8a0718..56c990012d 100644 --- a/usr/src/uts/sun4v/ontario/tsalarm/Makefile +++ b/usr/src/uts/sun4v/ontario/tsalarm/Makefile @@ -33,7 +33,6 @@ UTSBASE = ../../.. # MODULE = tsalarm OBJECTS = $(ONTARIO_TSALARM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(ONTARIO_TSALARM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_ONTARIO_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4v/ontario/io @@ -46,45 +45,29 @@ include $(UTSBASE)/sun4v/ontario/Makefile.ontario # ALL_BUILDS = $(ALL_BUILDSONLY64) DEF_BUILDS = $(DEF_BUILDSONLY64) -CLEANLINTFILES += $(LINT32_FILES) - -# -# lint pass one enforcement # # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -# Turn this on once compiler understands v9 in it's backend -#INLINES += $(UTSBASE)/sun4v/io/pci.il - -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CFLAGS += -I$(UTSBASE)/sun4u/mpxu - # # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign -#Need to verify to add glvc driver required -LDFLAGS += -dy +#Need to verify to add glvc driver required #LDFLAGS += -dy -Ndrv/rmclomv # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - +CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) @@ -101,12 +84,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/os/cpc_subr.c b/usr/src/uts/sun4v/os/cpc_subr.c index f545120f64..36ddaa9506 100644 --- a/usr/src/uts/sun4v/os/cpc_subr.c +++ b/usr/src/uts/sun4v/os/cpc_subr.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2021 Joyent, Inc. */ /* @@ -93,8 +94,7 @@ kcpc_hw_startup_cpu(ushort_t cpflags) if (kcpc_counts_include_idle) return; - installctx(t, cp, kcpc_idle_save, kcpc_idle_restore, NULL, NULL, - NULL, NULL); + kcpc_idle_ctxop_install(t, cp); } /* diff --git a/usr/src/uts/sun4v/os/intrq.c b/usr/src/uts/sun4v/os/intrq.c index 329956b7dc..f104643e9c 100644 --- a/usr/src/uts/sun4v/os/intrq.c +++ b/usr/src/uts/sun4v/os/intrq.c @@ -195,7 +195,7 @@ cpu_intrq_cleanup(struct cpu *cpu) if (mcpup->mondo_data) { contig_mem_free(mcpup->mondo_data, INTR_REPORT_SIZE); mcpup->mondo_data = NULL; - mcpup->mondo_data_ra = NULL; + mcpup->mondo_data_ra = 0; } /* @@ -216,7 +216,7 @@ cpu_intrq_cleanup(struct cpu *cpu) if (mcpup->cpu_list) { contig_mem_free(mcpup->cpu_list, cpu_list_size); mcpup->cpu_list = NULL; - mcpup->cpu_list_ra = NULL; + mcpup->cpu_list_ra = 0; } /* @@ -226,7 +226,7 @@ cpu_intrq_cleanup(struct cpu *cpu) cpu_q_size = cpu_q_entries * INTR_REPORT_SIZE; contig_mem_free(mcpup->cpu_q_va, cpu_q_size); mcpup->cpu_q_va = NULL; - mcpup->cpu_q_base_pa = NULL; + mcpup->cpu_q_base_pa = 0; mcpup->cpu_q_size = 0; } @@ -234,7 +234,7 @@ cpu_intrq_cleanup(struct cpu *cpu) dev_q_size = dev_q_entries * INTR_REPORT_SIZE; contig_mem_free(mcpup->dev_q_va, dev_q_size); mcpup->dev_q_va = NULL; - mcpup->dev_q_base_pa = NULL; + mcpup->dev_q_base_pa = 0; mcpup->dev_q_size = 0; } @@ -242,7 +242,7 @@ cpu_intrq_cleanup(struct cpu *cpu) cpu_rq_size = cpu_rq_entries * Q_ENTRY_SIZE; contig_mem_free(mcpup->cpu_rq_va, 2 * cpu_rq_size); mcpup->cpu_rq_va = NULL; - mcpup->cpu_rq_base_pa = NULL; + mcpup->cpu_rq_base_pa = 0; mcpup->cpu_rq_size = 0; } @@ -250,7 +250,7 @@ cpu_intrq_cleanup(struct cpu *cpu) cpu_nrq_size = cpu_nrq_entries * Q_ENTRY_SIZE; contig_mem_free(mcpup->cpu_nrq_va, 2 * cpu_nrq_size); mcpup->cpu_nrq_va = NULL; - mcpup->cpu_nrq_base_pa = NULL; + mcpup->cpu_nrq_base_pa = 0; mcpup->cpu_nrq_size = 0; } } diff --git a/usr/src/uts/sun4v/os/mach_cpu_states.c b/usr/src/uts/sun4v/os/mach_cpu_states.c index f26f840967..9b72de9330 100644 --- a/usr/src/uts/sun4v/os/mach_cpu_states.c +++ b/usr/src/uts/sun4v/os/mach_cpu_states.c @@ -279,7 +279,7 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb) devtree_freeze(); if (invoke_cb) - (void) callb_execute_class(CB_CL_MDBOOT, NULL); + (void) callb_execute_class(CB_CL_MDBOOT, 0); /* * Clear any unresolved UEs from memory. @@ -380,7 +380,7 @@ panic_stopcpus(cpu_t *cp, kthread_t *t, int spl) (void) splzs(); CPUSET_ALL_BUT(cps, cp->cpu_id); - xt_some(cps, (xcfunc_t *)idle_stop_xcall, (uint64_t)&panic_idle, NULL); + xt_some(cps, (xcfunc_t *)idle_stop_xcall, (uint64_t)&panic_idle, 0); for (i = 0; i < NCPU; i++) { if (i != cp->cpu_id && CPU_XCALL_READY(i)) { @@ -589,8 +589,8 @@ ptl1_panic_handler(ptl1_state_t *pstate) "CPU ECC error loop", /* PTL1_BAD_ECC */ "unexpected error from hypervisor call", /* PTL1_BAD_HCALL */ "unexpected global level(%gl)", /* PTL1_BAD_GL */ - "Watchdog Reset", /* PTL1_BAD_WATCHDOG */ - "unexpected RED mode trap", /* PTL1_BAD_RED */ + "Watchdog Reset", /* PTL1_BAD_WATCHDOG */ + "unexpected RED mode trap", /* PTL1_BAD_RED */ "return value EINVAL from hcall: "\ "UNMAP_PERM_ADDR", /* PTL1_BAD_HCALL_UNMAP_PERM_EINVAL */ "return value ENOMAP from hcall: "\ diff --git a/usr/src/uts/sun4v/os/mach_startup.c b/usr/src/uts/sun4v/os/mach_startup.c index 5962239aef..983cdfbd5d 100644 --- a/usr/src/uts/sun4v/os/mach_startup.c +++ b/usr/src/uts/sun4v/os/mach_startup.c @@ -362,7 +362,7 @@ mach_htraptrace_setup(int cpuid) contig_mem_alloc_align(HTRAP_TSIZE, HTRAP_TSIZE); if (ctlp->d.hvaddr_base == NULL) { ctlp->d.hlimit = 0; - ctlp->d.hpaddr_base = NULL; + ctlp->d.hpaddr_base = 0; cmn_err(CE_WARN, "!cpu%d: failed to allocate HV " "traptrace buffer", cpuid); } else { @@ -425,7 +425,7 @@ mach_htraptrace_configure(int cpuid) if (ret != H_EOK) { ctlp->d.hvaddr_base = NULL; ctlp->d.hlimit = 0; - ctlp->d.hpaddr_base = NULL; + ctlp->d.hpaddr_base = 0; } } } else { @@ -438,7 +438,7 @@ mach_htraptrace_configure(int cpuid) htrap_tr0_inuse = 0; ctlp->d.hvaddr_base = NULL; ctlp->d.hlimit = 0; - ctlp->d.hpaddr_base = NULL; + ctlp->d.hpaddr_base = 0; } else cmn_err(CE_WARN, "!cpu%d: HV traptracing is not disabled, " @@ -468,7 +468,7 @@ mach_htraptrace_cleanup(int cpuid) } ctlp->d.hvaddr_base = NULL; ctlp->d.hlimit = 0; - ctlp->d.hpaddr_base = NULL; + ctlp->d.hpaddr_base = 0; } } diff --git a/usr/src/uts/sun4v/os/mpo.c b/usr/src/uts/sun4v/os/mpo.c index ad0cf0e78a..12b572db72 100644 --- a/usr/src/uts/sun4v/os/mpo.c +++ b/usr/src/uts/sun4v/os/mpo.c @@ -148,8 +148,8 @@ static int szc_mask0 = 0; /* Save mblocks from the MD */ #define SMALL_MBLOCKS_COUNT 8 -static struct mblock_md *mpo_mblock; -static struct mblock_md small_mpo_mblocks[SMALL_MBLOCKS_COUNT]; +static struct mblock_md *mpo_mblock; +static struct mblock_md small_mpo_mblocks[SMALL_MBLOCKS_COUNT]; static int n_mblocks = 0; /* Save mem_node stripes calculate from mblocks and lgroups. */ @@ -191,7 +191,7 @@ static void mnode_update(mpo_config_t *, pfn_t, pfn_t, update_t); /* Debug support */ #if defined(DEBUG) && !defined(lint) -#define VALIDATE_SLICE(base, end) { \ +#define VALIDATE_SLICE(base, end) { \ ASSERT(IS_P2ALIGNED(ptob(base), TTEBYTES(TTE256M))); \ ASSERT(IS_P2ALIGNED(ptob(end - base + 1), TTEBYTES(TTE256M))); \ } @@ -307,7 +307,7 @@ cpuid_to_cpunode(md_t *md, int cpuid) { mde_cookie_t rootnode, foundnode, *cpunodes; uint64_t cpuid_prop; - int n_cpunodes, i; + int n_cpunodes, i; if (md == NULL) return (MDE_INVAL_ELEM_COOKIE); @@ -1333,7 +1333,7 @@ valid_pages(md_t *md, mde_cookie_t cpu0) * to get a sane mask. */ - if (cpu0 == NULL) + if (cpu0 == 0) szc_mask = szc_mask0; else { if (md_get_prop_val(md, cpu0, "mmu-page-size-list", &szc_mask)) diff --git a/usr/src/uts/sun4v/os/suspend.c b/usr/src/uts/sun4v/os/suspend.c index e81eb001a9..2d91c6da49 100644 --- a/usr/src/uts/sun4v/os/suspend.c +++ b/usr/src/uts/sun4v/os/suspend.c @@ -669,7 +669,7 @@ suspend_start(char *error_reason, size_t max_reason_len) /* Set the {%tick,%stick}.NPT bits on all CPUs */ if (enable_user_tick_stick_emulation) { - xc_all((xcfunc_t *)enable_tick_stick_npt, NULL, NULL); + xc_all((xcfunc_t *)enable_tick_stick_npt, 0, 0); xt_sync(cpu_ready_set); ASSERT(gettick_npt() != 0); ASSERT(getstick_npt() != 0); diff --git a/usr/src/uts/sun4v/pcie/Makefile b/usr/src/uts/sun4v/pcie/Makefile index 12cf0358a9..5f58e1fb6c 100644 --- a/usr/src/uts/sun4v/pcie/Makefile +++ b/usr/src/uts/sun4v/pcie/Makefile @@ -42,8 +42,6 @@ UTSBASE = ../.. MODULE = pcie OBJECTS = $(PCIE_MISC_OBJS:%=$(OBJS_DIR)/%) \ $(PCI_STRING_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PCIE_MISC_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(PCI_STRING_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -55,13 +53,12 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # # Dependency # -LDFLAGS += -dy -Nmisc/busra +LDFLAGS += -Nmisc/busra CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-unused-value @@ -81,12 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/platmod/Makefile b/usr/src/uts/sun4v/platmod/Makefile index 149000cfb0..4fcbfc96a6 100644 --- a/usr/src/uts/sun4v/platmod/Makefile +++ b/usr/src/uts/sun4v/platmod/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = platmod OBJECTS = $(PLATMOD_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PLATMOD_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_PLAT_DIR)/$(MODULE) PLAT_DIR = . @@ -59,12 +58,8 @@ CLEANFILES += $(PLATLIB) # Define targets # ALL_TARGET = $(PLATLIB) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # @@ -80,12 +75,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(PLATLIB): $(OBJECTS) diff --git a/usr/src/uts/sun4v/platsvc/Makefile b/usr/src/uts/sun4v/platsvc/Makefile index 0c56b38552..3e158a31dd 100644 --- a/usr/src/uts/sun4v/platsvc/Makefile +++ b/usr/src/uts/sun4v/platsvc/Makefile @@ -35,9 +35,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = platsvc +MODULE = platsvc OBJECTS = $(PLATSVC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PLATSVC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -49,13 +48,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += $(CNOWARN_UNINIT) # @@ -66,7 +60,7 @@ CFLAGS += -dalign # # Module Dependencies # -LDFLAGS += -dy -Nmisc/ds -Ndrv/drctl +LDFLAGS += -Nmisc/ds -Ndrv/drctl # # Default build targets. @@ -81,12 +75,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/promif/promif_asr.c b/usr/src/uts/sun4v/promif/promif_asr.c index 7bc20982f0..3edb253617 100644 --- a/usr/src/uts/sun4v/promif/promif_asr.c +++ b/usr/src/uts/sun4v/promif/promif_asr.c @@ -24,15 +24,13 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/promif_impl.h> /* * The Automatic System Recovery (ASR) database present in some * versions of firmware is not supported on sun4v platforms. * However, there is an external interface to these prom interfaces - * from the openprom(7D) driver. They are not documented in the + * from the openprom(4D) driver. They are not documented in the * man page, but they should still be handled here, just enough * so the user gets a sensible error back if they stumble onto * them. diff --git a/usr/src/uts/sun4v/promif/promif_io.c b/usr/src/uts/sun4v/promif/promif_io.c index c9d237da02..752b2f881e 100644 --- a/usr/src/uts/sun4v/promif/promif_io.c +++ b/usr/src/uts/sun4v/promif/promif_io.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/promif_impl.h> #include <sys/systm.h> #include <sys/hypervisor_api.h> @@ -229,7 +227,7 @@ promif_write(void *p) len = p1275_cell2size(ci[5]); /* only support stdout (console) */ - ASSERT(fd == istdout); + VERIFY(fd == istdout); rlen = promif_do_write(buf, len); @@ -256,7 +254,7 @@ promif_read(void *p) len = p1275_cell2size(ci[5]); /* only support stdin (console) */ - ASSERT(fd == istdin); + VERIFY(fd == istdin); rlen = promif_do_read(buf, len, B_FALSE); diff --git a/usr/src/uts/sun4v/promif/promif_key.c b/usr/src/uts/sun4v/promif/promif_key.c index f35064d085..19123a454e 100644 --- a/usr/src/uts/sun4v/promif/promif_key.c +++ b/usr/src/uts/sun4v/promif/promif_key.c @@ -24,17 +24,15 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/promif_impl.h> /* * Secure WAN boot requires firmware support for storing and * retrieving security keys. The user command to set these - * keys in firmware storage is ickey(1M). Currently, sun4v + * keys in firmware storage is ickey(8). Currently, sun4v * platforms do not support this functionality. However, there * is an external interface to these prom interfaces from the - * openprom(7D) driver. They are not documented in the man page, + * openprom(4D) driver. They are not documented in the man page, * but they should still be handled just well enough so that * the user gets a sensible error back. */ diff --git a/usr/src/uts/sun4v/px/Makefile b/usr/src/uts/sun4v/px/Makefile index d3b224707a..6fa2f62f33 100644 --- a/usr/src/uts/sun4v/px/Makefile +++ b/usr/src/uts/sun4v/px/Makefile @@ -37,7 +37,6 @@ UTSBASE = ../.. # MODULE = px OBJECTS = $(PX_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PX_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -55,7 +54,6 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -64,27 +62,10 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) INC_PATH += -I$(UTSBASE)/sun4/io/px # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-clobbered @@ -95,7 +76,7 @@ CERRWARN += -_gcc=-Wno-unused-label # Dependency # -LDFLAGS += -dy -Nmisc/pcie +LDFLAGS += -Nmisc/pcie # Default build targets. # @@ -109,12 +90,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/qcn/Makefile b/usr/src/uts/sun4v/qcn/Makefile index 3369e146a5..c96545fd89 100644 --- a/usr/src/uts/sun4v/qcn/Makefile +++ b/usr/src/uts/sun4v/qcn/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = qcn OBJECTS = $(QCN_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(QCN_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -59,11 +58,12 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses @@ -71,13 +71,10 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_STATIC_UNUSED # # Default build targets. @@ -92,12 +89,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/rootnex/Makefile b/usr/src/uts/sun4v/rootnex/Makefile index 004b5140c2..fc8e37b5f9 100644 --- a/usr/src/uts/sun4v/rootnex/Makefile +++ b/usr/src/uts/sun4v/rootnex/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = rootnex OBJECTS = $(ROOTNEX_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(ROOTNEX_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -60,29 +59,14 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_STATIC_UNUSED - -# # Default build targets. # .KEEP_STATE: @@ -95,12 +79,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/s10_brand/Makefile b/usr/src/uts/sun4v/s10_brand/Makefile index acdd849a3f..0f25fee08d 100644 --- a/usr/src/uts/sun4v/s10_brand/Makefile +++ b/usr/src/uts/sun4v/s10_brand/Makefile @@ -36,7 +36,6 @@ S10_BASE = $(UTSBASE)/common/brand/solaris10 # MODULE = s10_brand OBJECTS = $(S10_BRAND_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(S10_BRAND_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_BRAND_DIR)/$(MODULE) # @@ -48,14 +47,13 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # # Update compiler variables. # INC_PATH += -I$(S10_BASE) -I$(OBJS_DIR) -LDFLAGS += -dy -Nexec/elfexec +LDFLAGS += -Nexec/elfexec # # Default build targets. @@ -70,12 +68,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/sn1_brand/Makefile b/usr/src/uts/sun4v/sn1_brand/Makefile index bea8c2527e..8848dc86f3 100644 --- a/usr/src/uts/sun4v/sn1_brand/Makefile +++ b/usr/src/uts/sun4v/sn1_brand/Makefile @@ -36,7 +36,6 @@ SN1_BASE = $(UTSBASE)/common/brand/sn1 # MODULE = sn1_brand OBJECTS = $(SN1_BRAND_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SN1_BRAND_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_BRAND_DIR)/$(MODULE) # @@ -48,14 +47,13 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # # Update compiler variables. # INC_PATH += -I$(SN1_BASE) -I$(OBJS_DIR) -LDFLAGS += -dy -Nexec/elfexec +LDFLAGS += -Nexec/elfexec # # Default build targets. @@ -70,12 +68,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/su/Makefile b/usr/src/uts/sun4v/su/Makefile index 5b2296ce5f..f3a631f4c8 100644 --- a/usr/src/uts/sun4v/su/Makefile +++ b/usr/src/uts/sun4v/su/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = su OBJECTS = $(SU_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SU_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -52,23 +51,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) @@ -85,12 +69,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/sys/ds_impl.h b/usr/src/uts/sun4v/sys/ds_impl.h index a2a06d21a3..04bdd3704c 100644 --- a/usr/src/uts/sun4v/sys/ds_impl.h +++ b/usr/src/uts/sun4v/sys/ds_impl.h @@ -196,7 +196,7 @@ typedef struct ds_port { uint32_t ver_idx; /* index of version during handshake */ ds_ldc_t ldc; /* LDC for this port */ ds_domain_hdl_t domain_hdl; /* LDOMs domain hdl assoc. with port */ - char *domain_name; /* LDOMs domain name assoc. with port */ + char *domain_name; /* LDOMs domain name assoc. with port */ } ds_port_t; #define IS_DS_PORT(port) 1 /* VBSC code compatability */ @@ -215,6 +215,8 @@ typedef struct ds_port { typedef ulong_t ds_portset_t[DS_PORTSET_SIZE]; +extern ds_port_t ds_ports[DS_MAX_PORTS]; +extern ds_portset_t ds_allports; extern ds_portset_t ds_nullport; #define DS_PORTID_INVALID ((uint64_t)-1) @@ -340,6 +342,8 @@ typedef struct ds_svcs { /* enable/disable taskq processing */ extern boolean_t ds_enabled; +extern ds_svcs_t ds_svcs; + /* * DS Message Logging * @@ -404,7 +408,7 @@ typedef struct ds_log_entry { #define DS_LOG_POOL_END (ds_log_entry_pool + DS_LOG_NPOOL) #define DS_IS_POOL_ENTRY(ep) (((ep) >= ds_log_entry_pool) && \ - ((ep) <= &(ds_log_entry_pool[DS_LOG_NPOOL]))) + ((ep) < &(ds_log_entry_pool[DS_LOG_NPOOL]))) /* VBSC code compatability related defines */ @@ -554,8 +558,8 @@ void ds_dump_msg(void *buf, size_t len); #define DS_DUMP_MSG(flags, buf, len) #define DS_DUMP_LDC_MSG(buf, len) -#define DS_BADHDL1 NULL -#define DS_BADHDL2 NULL +#define DS_BADHDL1 (ds_svc_hdl_t)0 +#define DS_BADHDL2 (ds_svc_hdl_t)0 #endif /* DEBUG */ diff --git a/usr/src/uts/sun4v/sys/ldc_impl.h b/usr/src/uts/sun4v/sys/ldc_impl.h index 4acea4f84f..be381ad018 100644 --- a/usr/src/uts/sun4v/sys/ldc_impl.h +++ b/usr/src/uts/sun4v/sys/ldc_impl.h @@ -229,7 +229,7 @@ typedef struct ldc_msg { uint8_t _type; /* Message type */ uint8_t _stype; /* Message subtype */ uint8_t _ctrl; /* Control/Error Message */ - uint8_t _env; /* Message Envelope */ + uint8_t _env; /* Message Envelope */ uint32_t _seqid; /* Sequence ID */ union { @@ -285,7 +285,7 @@ typedef union { pgszc:4; /* <3:0> pgsz code */ } mte_bit; - uint64_t ll; + uint64_t ll; } ldc_mte_t; @@ -300,8 +300,8 @@ typedef union { #define mte_pgszc mte_bit.pgszc #define MTE_BSZS_SHIFT(sz) ((sz) * 3) -#define MTEBYTES(sz) (MMU_PAGESIZE << MTE_BSZS_SHIFT(sz)) -#define MTEPAGES(sz) (1 << MTE_BSZS_SHIFT(sz)) +#define MTEBYTES(sz) (MMU_PAGESIZE << MTE_BSZS_SHIFT(sz)) +#define MTEPAGES(sz) (1 << MTE_BSZS_SHIFT(sz)) #define MTE_PAGE_SHIFT(sz) (MMU_PAGESHIFT + MTE_BSZS_SHIFT(sz)) #define MTE_PAGE_OFFSET(sz) (MTEBYTES(sz) - 1) #define MTE_PAGEMASK(sz) (~MTE_PAGE_OFFSET(sz)) @@ -400,7 +400,7 @@ typedef struct ldc_dring { ldc_mem_handle_t mhdl; /* Mem handle to desc ring */ struct ldc_dring *ch_next; /* Next dring in channel */ - struct ldc_dring *next; /* Next dring overall */ + struct ldc_dring *next; /* Next dring overall */ } ldc_dring_t; @@ -493,11 +493,11 @@ struct ldc_chan { * LDC module soft state structure */ typedef struct ldc_soft_state { - kmutex_t lock; /* Protects ldc_soft_state_t */ + kmutex_t lock; /* Protects ldc_soft_state_t */ ldc_cnex_t cinfo; /* channel nexus info */ uint64_t channel_count; /* Number of channels */ uint64_t channels_open; /* Number of open channels */ - ldc_chan_t *chan_list; /* List of LDC endpoints */ + ldc_chan_t *chan_list; /* List of LDC endpoints */ ldc_dring_t *dring_list; /* Descriptor rings (for export) */ kmem_cache_t *memhdl_cache; /* Memory handle cache */ @@ -522,9 +522,9 @@ if (ldcdbg & 0x02) \ if (ldcdbg & 0x04) \ ldcdebug #else -#define D1 -#define D2 -#define DWARN +#define D1(...) +#define D2(...) +#define DWARN(...) #endif #ifdef __cplusplus diff --git a/usr/src/uts/sun4v/sys/vdc.h b/usr/src/uts/sun4v/sys/vdc.h index bd10ee336c..6d521b6985 100644 --- a/usr/src/uts/sun4v/sys/vdc.h +++ b/usr/src/uts/sun4v/sys/vdc.h @@ -115,7 +115,7 @@ extern "C" { /* * Scheme to store the instance number and the slice number in the minor number. - * (NOTE: Uses the same format and definitions as the sd(7D) driver) + * (NOTE: Uses the same format and definitions as the sd(4D) driver) */ #define VD_MAKE_DEV(instance, minor) ((instance << VDCUNIT_SHIFT) | minor) @@ -365,7 +365,7 @@ typedef struct vdc { clock_t failfast_interval; /* interval in microsecs */ /* - * kstats used to store I/O statistics consumed by iostat(1M). + * kstats used to store I/O statistics consumed by iostat(8). * These are protected by the lock mutex. */ kstat_t *io_stats; diff --git a/usr/src/uts/sun4v/sys/vdsk_common.h b/usr/src/uts/sun4v/sys/vdsk_common.h index ca1ae648f4..7ee15f096b 100644 --- a/usr/src/uts/sun4v/sys/vdsk_common.h +++ b/usr/src/uts/sun4v/sys/vdsk_common.h @@ -531,7 +531,7 @@ int vd_efi_alloc_and_read(vd_efi_dev_t *dev, efi_gpt_t **gpt, efi_gpe_t **gpe); void vd_efi_free(vd_efi_dev_t *dev, efi_gpt_t *gpt, efi_gpe_t *gpe); /* - * Macros to update the I/O statistics kstat consumed by iostat(1m). + * Macros to update the I/O statistics kstat consumed by iostat(8). */ /* diff --git a/usr/src/uts/sun4v/sys/vnet.h b/usr/src/uts/sun4v/sys/vnet.h index 81b958fedf..04d2df006a 100644 --- a/usr/src/uts/sun4v/sys/vnet.h +++ b/usr/src/uts/sun4v/sys/vnet.h @@ -90,16 +90,16 @@ typedef struct vnet_hio_kstats { kstat_named_t oerrors; /* required by kstat for MIB II objects(RFC 1213) */ - kstat_named_t rbytes; /* MIB - ifInOctets */ + kstat_named_t rbytes; /* MIB - ifInOctets */ kstat_named_t rbytes64; - kstat_named_t obytes; /* MIB - ifOutOctets */ + kstat_named_t obytes; /* MIB - ifOutOctets */ kstat_named_t obytes64; - kstat_named_t multircv; /* MIB - ifInNUcastPkts */ - kstat_named_t multixmt; /* MIB - ifOutNUcastPkts */ + kstat_named_t multircv; /* MIB - ifInNUcastPkts */ + kstat_named_t multixmt; /* MIB - ifOutNUcastPkts */ kstat_named_t brdcstrcv; /* MIB - ifInNUcastPkts */ kstat_named_t brdcstxmt; /* MIB - ifOutNUcastPkts */ - kstat_named_t norcvbuf; /* MIB - ifInDiscards */ - kstat_named_t noxmtbuf; /* MIB - ifOutDiscards */ + kstat_named_t norcvbuf; /* MIB - ifInDiscards */ + kstat_named_t noxmtbuf; /* MIB - ifOutDiscards */ } vnet_hio_kstats_t; typedef struct vnet_tx_ring_stats { @@ -348,10 +348,10 @@ enum { DBG_LEVEL1 = 0x01, DBG_LEVEL2 = 0x02, DBG_WARN = 0x04, #else -#define DBG1(...) if (0) do { } while (0) -#define DBG2(...) if (0) do { } while (0) -#define DWARN(...) if (0) do { } while (0) -#define DERR(...) if (0) do { } while (0) +#define DBG1(...) +#define DBG2(...) +#define DWARN(...) +#define DERR(...) #endif diff --git a/usr/src/uts/sun4v/tpm/Makefile b/usr/src/uts/sun4v/tpm/Makefile index 7a44ba61db..19457e1e26 100644 --- a/usr/src/uts/sun4v/tpm/Makefile +++ b/usr/src/uts/sun4v/tpm/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = tpm OBJECTS = $(TPM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(TPM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -58,12 +57,8 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) CFLAGS += -xCC @@ -73,16 +68,7 @@ CPPFLAGS += -I$(ROOT)/usr/include # This is for /usr/include/tss/, which is not built in the ON consolidation CPPFLAGS += -I$(ADJUNCT_PROTO)/usr/include -LDFLAGS += -dy -Nmisc/kcf - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON +LDFLAGS += -Nmisc/kcf # # Default build targets. @@ -97,12 +83,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/trapstat/Makefile b/usr/src/uts/sun4v/trapstat/Makefile index fa735a534e..1e1c5b71b1 100644 --- a/usr/src/uts/sun4v/trapstat/Makefile +++ b/usr/src/uts/sun4v/trapstat/Makefile @@ -22,8 +22,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This makefile drives the production of the trapstat kernel module. # # sun4v implementation architecture dependent @@ -39,7 +37,6 @@ UTSBASE = ../.. # MODULE = trapstat OBJECTS = $(TRAPSTAT_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(TRAPSTAT_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/sun4/io @@ -52,23 +49,9 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_STATIC_UNUSED - -# # Default build targets. # .KEEP_STATE: @@ -81,12 +64,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/unix/Makefile b/usr/src/uts/sun4v/unix/Makefile index ac0c02abe8..ebf63d0ef8 100644 --- a/usr/src/uts/sun4v/unix/Makefile +++ b/usr/src/uts/sun4v/unix/Makefile @@ -43,12 +43,6 @@ UNIX = unix OBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \ $(CORE_OBJS:%=$(OBJS_DIR)/%) \ $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%) -LINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(CORE_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(KRTLD_OBJS:%.o=$(LINTS_DIR)/%.ln) \ - $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \ - $(LINTS_DIR)/vers.ln \ - $(LINTS_DIR)/modstubs.ln KRTLD_MAPFILE = $(UTSBASE)/sparc/krtld/mapfile KRTLD_OBJECTS = $(KRTLD_OBJS:%=$(OBJS_DIR)/%) @@ -83,7 +77,6 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(UNIX_BIN) -LINT_TARGET = $(LINT_LIB) INSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK) # @@ -100,26 +93,16 @@ CLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(KRTLD_O) $(KRTLD_OBJECTS) \ $(DTRACESTUBS_O) $(DTRACESTUBS) CLOBBERFILES = $(CLEANFILES) $(UNIX_BIN) -CLEANLINTFILES += $(LINT_LIB) -# -# lint pass one enforcement # Turn on doubleword alignment for 64 bit counter timer registers -# -CFLAGS += $(CCVERBOSE) -dalign +CFLAGS += -dalign # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - +CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-char-subscripts @@ -145,10 +128,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) @@ -195,23 +174,6 @@ $(CPULIB): $(CPU_OBJ) $(BUILD.SO) $(CPU_OBJ) # -# The global lint target builds the kernel lint library (llib-lunix.ln) -# which is equivalent to a lint of /unix.o. Then all kernel modules for -# this architecture are linted against the kernel lint library. -# -# Note: lint errors in the kernel lint library will be repeated for -# each module. It is important that the kernel lint library -# be clean to keep the textual output to a reasonable level. -# - -$(LINT_LIB): $(LINT_LIB_DIR) $(LINTS) - @-$(ECHO) "\n$(UNIX): (library construction):" - @$(LINT) -o $(UNIX) $(LINTFLAGS) $(LINTS) - @$(MV) $(@F) $@ - -lintlib: $(LINT_DEPS) - -# # Include common targets. # include $(UTSBASE)/$(PLATFORM)/Makefile.targ diff --git a/usr/src/uts/sun4v/vcc/Makefile b/usr/src/uts/sun4v/vcc/Makefile index 3a333ba3c8..1be8725770 100644 --- a/usr/src/uts/sun4v/vcc/Makefile +++ b/usr/src/uts/sun4v/vcc/Makefile @@ -40,9 +40,8 @@ UTSBASE = ../.. # # Define the module and object file sets. # -MODULE = vcc +MODULE = vcc OBJECTS = $(VCC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VCC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -61,11 +60,12 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-type-limits @@ -80,17 +80,13 @@ CERRWARN += -erroff=E_STATEMENT_NOT_REACHED # # module dependencies # -LDFLAGS += -dy -Nmisc/ldc -Nmisc/platsvc +LDFLAGS += -Nmisc/ldc -Nmisc/platsvc # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. # Please do not carry these forward to new Makefiles. # -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON # # Default build targets. @@ -105,12 +101,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vdc/Makefile b/usr/src/uts/sun4v/vdc/Makefile index 9877103746..6b3734a705 100644 --- a/usr/src/uts/sun4v/vdc/Makefile +++ b/usr/src/uts/sun4v/vdc/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = vdc OBJECTS = $(VDC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VDC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -59,7 +58,6 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) CFLAGS += $(CCVERBOSE) @@ -68,7 +66,7 @@ CFLAGS += -D_EXTVTOC CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) -LDFLAGS += -dy -Nmisc/ldc -Nmisc/platsvc -Nmisc/scsi +LDFLAGS += -Nmisc/ldc -Nmisc/platsvc -Nmisc/scsi # # Default build targets. @@ -83,12 +81,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vds/Makefile b/usr/src/uts/sun4v/vds/Makefile index 664b987d0f..ea36daae97 100644 --- a/usr/src/uts/sun4v/vds/Makefile +++ b/usr/src/uts/sun4v/vds/Makefile @@ -40,7 +40,6 @@ UTSBASE = ../.. # MODULE = vds OBJECTS = $(VDS_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VDS_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -59,7 +58,6 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) CFLAGS += $(CCVERBOSE) @@ -70,7 +68,7 @@ CERRWARN += $(CNOWARN_UNINIT) # # module dependencies # -LDFLAGS += -dy -Nmisc/ldc -Nmisc/platsvc +LDFLAGS += -Nmisc/ldc -Nmisc/platsvc # # Default build targets. @@ -85,12 +83,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vfalls/Makefile b/usr/src/uts/sun4v/vfalls/Makefile index 001654791b..57494194a4 100644 --- a/usr/src/uts/sun4v/vfalls/Makefile +++ b/usr/src/uts/sun4v/vfalls/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = SUNW,UltraSPARC-T2+ OBJECTS = $(NIAGARA2CPU_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(NIAGARA2CPU_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE) CPU_DIR = . @@ -59,13 +58,9 @@ CLEANFILES += $(CPULIB) $(SYM_MOD) # Define targets # ALL_TARGET = $(SYM_MOD) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = def $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) -DVFALLS_IMPL +CFLAGS += -DVFALLS_IMPL # # cpu-module-specific flags @@ -97,12 +92,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) $(CPULIB): $(OBJECTS) diff --git a/usr/src/uts/sun4v/vfalls_pcbe/Makefile b/usr/src/uts/sun4v/vfalls_pcbe/Makefile index 88414e47da..3e35246b90 100644 --- a/usr/src/uts/sun4v/vfalls_pcbe/Makefile +++ b/usr/src/uts/sun4v/vfalls_pcbe/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This Makefile builds the UltraSPARC-T2+ Performance Counter BackEnd (PCBE). # @@ -34,7 +34,6 @@ UTSBASE = ../.. # MODULE = pcbe.SUNW,UltraSPARC-T2+ OBJECTS = $(N2_PCBE_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(N2_PCBE_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_PCBE_DIR)/$(MODULE) # @@ -46,13 +45,8 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets. # ALL_TARGET = $(BINARY) -LINT_MODULE = vfalls_pcbe -LINT_TARGET = $(LINT_MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += -DVFALLS_IMPL # @@ -74,12 +68,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vis/Makefile b/usr/src/uts/sun4v/vis/Makefile index 522d46d84a..a440a4b59b 100644 --- a/usr/src/uts/sun4v/vis/Makefile +++ b/usr/src/uts/sun4v/vis/Makefile @@ -42,7 +42,6 @@ UTSBASE = ../.. # MODULE = vis OBJECTS = $(VIS_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VIS_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_MISC_DIR)/$(MODULE) # @@ -54,11 +53,12 @@ include $(UTSBASE)/sun4v/Makefile.sun4v # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement +# For now, disable these warnings; maintainers should endeavor +# to investigate and remove these for maximum coverage. +# Please do not carry these forward to new Makefiles. # CFLAGS += $(CCVERBOSE) CERRWARN += $(CNOWARN_UNINIT) @@ -73,12 +73,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vldc/Makefile b/usr/src/uts/sun4v/vldc/Makefile index 9fbf8f5fd8..f1d800ec03 100644 --- a/usr/src/uts/sun4v/vldc/Makefile +++ b/usr/src/uts/sun4v/vldc/Makefile @@ -23,9 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# -# uts/sun4v/vldc/Makefile + # # This makefile drives the production of the vldc driver module. # @@ -42,7 +40,6 @@ UTSBASE = ../.. # MODULE = vldc OBJECTS = $(VLDC_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VLDC_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -61,26 +58,14 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # # module dependencies # -LDFLAGS += -dy -Nmisc/ldc -Nmisc/platsvc - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV +LDFLAGS += -Nmisc/ldc -Nmisc/platsvc # # Default build targets. @@ -95,12 +80,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vlds/Makefile b/usr/src/uts/sun4v/vlds/Makefile index 7ef22bfc35..7cec4c6796 100644 --- a/usr/src/uts/sun4v/vlds/Makefile +++ b/usr/src/uts/sun4v/vlds/Makefile @@ -39,7 +39,6 @@ UTSBASE = ../.. # MODULE = vlds OBJECTS = $(VLDS_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VLDS_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -58,18 +57,13 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses # # Module Dependencies -LDFLAGS += -dy -Nmisc/ds -Nmisc/platsvc +LDFLAGS += -Nmisc/ds -Nmisc/platsvc # # Default build targets. @@ -84,12 +78,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vm/Makefile b/usr/src/uts/sun4v/vm/Makefile index f98b3bbdce..cf85466f2a 100644 --- a/usr/src/uts/sun4v/vm/Makefile +++ b/usr/src/uts/sun4v/vm/Makefile @@ -76,6 +76,5 @@ CLEANFILES= CLOBBERFILES= -CLEANLINTFILES= include ../../Makefile.targ diff --git a/usr/src/uts/sun4v/vm/mach_sfmmu.c b/usr/src/uts/sun4v/vm/mach_sfmmu.c index 398d0a069b..fcef120c0b 100644 --- a/usr/src/uts/sun4v/vm/mach_sfmmu.c +++ b/usr/src/uts/sun4v/vm/mach_sfmmu.c @@ -316,7 +316,7 @@ kdi_tlb_page_unlock(caddr_t va, int do_dtlb) void sfmmu_clear_utsbinfo() { - (void) hv_set_ctxnon0(0, NULL); + (void) hv_set_ctxnon0(0, 0); } /* diff --git a/usr/src/uts/sun4v/vm/mach_sfmmu_asm.s b/usr/src/uts/sun4v/vm/mach_sfmmu_asm.s index b0ee085586..2a2a8b4ca0 100644 --- a/usr/src/uts/sun4v/vm/mach_sfmmu_asm.s +++ b/usr/src/uts/sun4v/vm/mach_sfmmu_asm.s @@ -28,11 +28,7 @@ * routines. */ -#if defined(lint) -#include <sys/types.h> -#else /* lint */ #include "assym.h" -#endif /* lint */ #include <sys/asm_linkage.h> #include <sys/machtrap.h> @@ -54,34 +50,6 @@ * sfmmu related subroutines */ -#if defined (lint) - -/* ARGSUSED */ -void -sfmmu_raise_tsb_exception(uint64_t sfmmup, uint64_t rctx) -{} - -int -sfmmu_getctx_pri() -{ return(0); } - -int -sfmmu_getctx_sec() -{ return(0); } - -/* ARGSUSED */ -void -sfmmu_setctx_sec(uint_t ctx) -{} - -/* ARGSUSED */ -void -sfmmu_load_mmustate(sfmmu_t *sfmmup) -{ -} - -#else /* lint */ - /* * Invalidate either the context of a specific victim or any process * currently running on this CPU. @@ -430,24 +398,6 @@ sfmmu_load_mmustate(sfmmu_t *sfmmup) SET_SIZE(sfmmu_load_mmustate) -#endif /* lint */ - -#if defined(lint) - -/* Prefetch "struct tsbe" while walking TSBs */ -/*ARGSUSED*/ -void -prefetch_tsbe_read(struct tsbe *tsbep) -{} - -/* Prefetch the tsbe that we are about to write */ -/*ARGSUSED*/ -void -prefetch_tsbe_write(struct tsbe *tsbep) -{} - -#else /* lint */ - ENTRY(prefetch_tsbe_read) retl nop @@ -457,4 +407,3 @@ prefetch_tsbe_write(struct tsbe *tsbep) retl nop SET_SIZE(prefetch_tsbe_write) -#endif /* lint */ diff --git a/usr/src/uts/sun4v/vnet/Makefile b/usr/src/uts/sun4v/vnet/Makefile index 858c2c58da..37050e1523 100644 --- a/usr/src/uts/sun4v/vnet/Makefile +++ b/usr/src/uts/sun4v/vnet/Makefile @@ -42,7 +42,6 @@ UTSBASE = ../.. # MODULE = vnet OBJECTS = $(VNET_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VNET_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -61,30 +60,14 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) CFLAGS += -DVGEN_HANDLE_LOST_PKTS # # Driver depends on MAC & IP # -LDFLAGS += -dy -N misc/mac -N drv/ip -N misc/ldc -N misc/platsvc - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON +LDFLAGS += -N misc/mac -N drv/ip -N misc/ldc -N misc/platsvc CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-clobbered @@ -107,12 +90,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vnex/Makefile b/usr/src/uts/sun4v/vnex/Makefile index 5d3ca30d63..b2b1a52e22 100644 --- a/usr/src/uts/sun4v/vnex/Makefile +++ b/usr/src/uts/sun4v/vnex/Makefile @@ -19,11 +19,10 @@ # CDDL HEADER END # # -# uts/sun4v/vnex/Makefile # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" + # # This makefile drives the production of the vnex driver kernel module. # @@ -40,7 +39,6 @@ UTSBASE = ../.. # MODULE = vnex OBJECTS = $(VNEX_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VNEX_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -59,23 +57,11 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# lint pass one enforcement -# CFLAGS += $(CCVERBOSE) # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - -# # Default build targets. # .KEEP_STATE: @@ -88,12 +74,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/sun4v/vsw/Makefile b/usr/src/uts/sun4v/vsw/Makefile index e7d0a439e7..cac74d3c2c 100644 --- a/usr/src/uts/sun4v/vsw/Makefile +++ b/usr/src/uts/sun4v/vsw/Makefile @@ -42,7 +42,6 @@ UTSBASE = ../.. # MODULE = vsw OBJECTS = $(VSW_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VSW_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -61,29 +60,12 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Module dependencies # -LDFLAGS += -dy -Nmisc/ldc -Nmisc/mac -Nmisc/platsvc - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON +LDFLAGS += -Nmisc/ldc -Nmisc/mac -Nmisc/platsvc CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-clobbered @@ -105,12 +87,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # |
