xref: /titanic_44/usr/src/uts/sparc/ml/modstubs.s (revision e7cbe64f7a72dae5cb44f100db60ca88f3313c65)
17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
57aadd8d4Skini * Common Development and Distribution License (the "License").
67aadd8d4Skini * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
217c478bd9Sstevel@tonic-gate/*
22bda89588Sjp151216 * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate */
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gate#if !defined(lint)
297c478bd9Sstevel@tonic-gate#include "assym.h"
307c478bd9Sstevel@tonic-gate#endif /* !lint */
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h>
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gate#if defined(lint)
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gatechar stubs_base[1], stubs_end[1];
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gate#else	/* lint */
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate/*
417c478bd9Sstevel@tonic-gate * WARNING: there is no check for forgetting to write END_MODULE,
427c478bd9Sstevel@tonic-gate * and if you do, the kernel will most likely crash.  Be careful
437c478bd9Sstevel@tonic-gate *
447c478bd9Sstevel@tonic-gate * This file assumes that all of the contributions to the data segment
457c478bd9Sstevel@tonic-gate * will be contiguous in the output file, even though they are separated
467c478bd9Sstevel@tonic-gate * by pieces of text.  This is safe for all assemblers I know of now...
477c478bd9Sstevel@tonic-gate */
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate/*
507c478bd9Sstevel@tonic-gate * This file uses ansi preprocessor features:
517c478bd9Sstevel@tonic-gate *
527c478bd9Sstevel@tonic-gate * 1. 	#define mac(a) extra_ ## a     -->   mac(x) expands to extra_a
537c478bd9Sstevel@tonic-gate * The old version of this is
547c478bd9Sstevel@tonic-gate *      #define mac(a) extra_/.*.*./a
557c478bd9Sstevel@tonic-gate * but this fails if the argument has spaces "mac ( x )"
567c478bd9Sstevel@tonic-gate * (Ignore the dots above, I had to put them in to keep this a comment.)
577c478bd9Sstevel@tonic-gate *
587c478bd9Sstevel@tonic-gate * 2.   #define mac(a) #a             -->    mac(x) expands to "x"
597c478bd9Sstevel@tonic-gate * The old version is
607c478bd9Sstevel@tonic-gate *      #define mac(a) "a"
617c478bd9Sstevel@tonic-gate *
627c478bd9Sstevel@tonic-gate * For some reason, the 5.0 preprocessor isn't happy with the above usage.
637c478bd9Sstevel@tonic-gate * For now, we're not using these ansi features.
647c478bd9Sstevel@tonic-gate *
657c478bd9Sstevel@tonic-gate * The reason is that "the 5.0 ANSI preprocessor" is built into the compiler
667c478bd9Sstevel@tonic-gate * and is a tokenizing preprocessor. This means, when confronted by something
677c478bd9Sstevel@tonic-gate * other than C token generation rules, strange things occur. In this case,
687c478bd9Sstevel@tonic-gate * when confronted by an assembly file, it would turn the token ".globl" into
697c478bd9Sstevel@tonic-gate * two tokens "." and "globl". For this reason, the traditional, non-ANSI
707c478bd9Sstevel@tonic-gate * preprocessor is used on assembly files.
717c478bd9Sstevel@tonic-gate *
727c478bd9Sstevel@tonic-gate * It would be desirable to have a non-tokenizing cpp (accp?) to use for this.
737c478bd9Sstevel@tonic-gate */
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate/*
767c478bd9Sstevel@tonic-gate * This file contains the stubs routines for modules which can be autoloaded.
777c478bd9Sstevel@tonic-gate */
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate/*
817c478bd9Sstevel@tonic-gate * See the 'struct mod_modinfo' definition to see what this structure
827c478bd9Sstevel@tonic-gate * is trying to achieve here.
837c478bd9Sstevel@tonic-gate */
847c478bd9Sstevel@tonic-gate/*
857c478bd9Sstevel@tonic-gate * XX64 - This still needs some repair.
867c478bd9Sstevel@tonic-gate * (a) define 'pointer alignment' and use it
877c478bd9Sstevel@tonic-gate * (b) define '.pword' or equivalent, and use it (to mean .word or .xword).
887c478bd9Sstevel@tonic-gate */
897c478bd9Sstevel@tonic-gate#define	MODULE(module,namespace)	\
907c478bd9Sstevel@tonic-gate	.seg	".data";		\
917c478bd9Sstevel@tonic-gatemodule/**/_modname:			\
927c478bd9Sstevel@tonic-gate	.ascii	"namespace/module";	\
937c478bd9Sstevel@tonic-gate	.byte	0;			\
947c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
957c478bd9Sstevel@tonic-gate	.global	module/**/_modinfo;	\
967c478bd9Sstevel@tonic-gate	.type	module/**/_modinfo, #object;	\
977c478bd9Sstevel@tonic-gate	.size	module/**/_modinfo, 16;	\
987c478bd9Sstevel@tonic-gatemodule/**/_modinfo:			\
997c478bd9Sstevel@tonic-gate	.word 0;			\
1007c478bd9Sstevel@tonic-gate	.word module/**/_modname;	\
1017c478bd9Sstevel@tonic-gate	.word 0;			\
1027c478bd9Sstevel@tonic-gate	.word 0;
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gate#define	END_MODULE(module)		\
1057c478bd9Sstevel@tonic-gate	.align 8; .word 0; .word 0	/* FIXME: .xword 0 */
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate#define STUB(module, fcnname, retfcn)	\
1097c478bd9Sstevel@tonic-gate    STUB_COMMON(module, fcnname, mod_hold_stub, retfcn, 0)
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gate/*
1127c478bd9Sstevel@tonic-gate * "weak stub", don't load on account of this call
1137c478bd9Sstevel@tonic-gate */
1147c478bd9Sstevel@tonic-gate#define WSTUB(module, fcnname, retfcn)	\
1157c478bd9Sstevel@tonic-gate    STUB_COMMON(module, fcnname, retfcn, retfcn, MODS_WEAK)
1167c478bd9Sstevel@tonic-gate
1177c478bd9Sstevel@tonic-gate/*
1187c478bd9Sstevel@tonic-gate * "non-unloadable stub", don't bother 'holding' module if it's already loaded
1197c478bd9Sstevel@tonic-gate * since the module cannot be unloaded.
1207c478bd9Sstevel@tonic-gate *
1217c478bd9Sstevel@tonic-gate * User *MUST* guarantee the module is not unloadable (no _fini routine).
1227c478bd9Sstevel@tonic-gate */
1237c478bd9Sstevel@tonic-gate#define NO_UNLOAD_STUB(module, fcnname, retfcn)	\
1247c478bd9Sstevel@tonic-gate    STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD)
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gate/*
1277c478bd9Sstevel@tonic-gate * Macro for modstubbed system calls whose modules are not unloadable.
1287c478bd9Sstevel@tonic-gate *
1297c478bd9Sstevel@tonic-gate * System call modstubs needs special handling for the case where
1307c478bd9Sstevel@tonic-gate * the modstub is a system call, because %fp comes from user frame.
1317c478bd9Sstevel@tonic-gate */
1327c478bd9Sstevel@tonic-gate#define	SCALL_NU_STUB(module, fcnname, retfcn)	\
1337c478bd9Sstevel@tonic-gate    SCALL_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD)
1347c478bd9Sstevel@tonic-gate/* "weak stub" for non-unloadable module, don't load on account of this call */
1357c478bd9Sstevel@tonic-gate#define NO_UNLOAD_WSTUB(module, fcnname, retfcn) \
1367c478bd9Sstevel@tonic-gate    STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD|MODS_WEAK)
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gate#define	STUB_DATA(module, fcnname, install_fcn, retfcn, weak)		\
1397c478bd9Sstevel@tonic-gate	.seg	".data";						\
1407c478bd9Sstevel@tonic-gate	.align	8;							\
1417c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
1427c478bd9Sstevel@tonic-gate	.word	0;			/* 0 */				\
1437c478bd9Sstevel@tonic-gate	.word	install_fcn;		/* 4 */				\
1447c478bd9Sstevel@tonic-gate	.word	0;			/* 8 */				\
1457c478bd9Sstevel@tonic-gate	.word	module/**/_modinfo;	/* c */				\
1467c478bd9Sstevel@tonic-gate	.word	0;			/* 10 */			\
1477c478bd9Sstevel@tonic-gate	.word	fcnname;		/* 14 */			\
1487c478bd9Sstevel@tonic-gate	.word	0;			/* 18 */			\
1497c478bd9Sstevel@tonic-gate	.word	retfcn;			/* 1c */			\
1507c478bd9Sstevel@tonic-gate	.word   weak			/* 20 */
1517c478bd9Sstevel@tonic-gate
1527c478bd9Sstevel@tonic-gate/*
1537c478bd9Sstevel@tonic-gate * The flag MODS_INSTALLED is stored in the stub data and is used to
1547c478bd9Sstevel@tonic-gate * indicate if a module is installed and initialized.  This flag is used
1557c478bd9Sstevel@tonic-gate * instead of the mod_stub_info->mods_modinfo->mod_installed flag
1567c478bd9Sstevel@tonic-gate * to minimize the number of pointer de-references for each function
1577c478bd9Sstevel@tonic-gate * call (and also to avoid possible TLB misses which could be induced
1587c478bd9Sstevel@tonic-gate * by dereferencing these pointers.)
1597c478bd9Sstevel@tonic-gate */
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gate#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak)		\
1627c478bd9Sstevel@tonic-gate	ENTRY_NP(fcnname);						\
1637c478bd9Sstevel@tonic-gate	save	%sp, -SA(MINFRAME), %sp;/* new window */		\
1647c478bd9Sstevel@tonic-gate	set	fcnname/**/_info, %l5;					\
1657c478bd9Sstevel@tonic-gate	ld	[%l5 + MODS_FLAG], %l1;	/* weak?? */			\
1667c478bd9Sstevel@tonic-gate	cmp	%l1, 0;							\
1677c478bd9Sstevel@tonic-gate	be,a	1f;			/* not weak */			\
1687c478bd9Sstevel@tonic-gate	restore;							\
1697c478bd9Sstevel@tonic-gate	btst	MODS_INSTALLED, %l1;	/* installed?? */		\
1707c478bd9Sstevel@tonic-gate 	bne,a,pt %xcc, 1f;		/* yes, do mod_hold thing */	\
1717c478bd9Sstevel@tonic-gate 	restore;							\
1727c478bd9Sstevel@tonic-gate 	ldn	[%l5 + MODS_RETFCN], %g1;				\
1737c478bd9Sstevel@tonic-gate	jmp	%g1;			/* no, just jump to retfcn */	\
1747c478bd9Sstevel@tonic-gate	restore;							\
1757c478bd9Sstevel@tonic-gate1:	sub	%sp, %fp, %g1;	/* get (-)size of callers stack */	\
1767c478bd9Sstevel@tonic-gate	save	%sp, %g1, %sp;	/* create new frame same size */	\
1777c478bd9Sstevel@tonic-gate	sub	%g0, %g1, %l4;  /* size of stack frame */		\
1787c478bd9Sstevel@tonic-gate	sethi	%hi(fcnname/**/_info), %l5;				\
1797c478bd9Sstevel@tonic-gate	b	stubs_common_code;					\
1807c478bd9Sstevel@tonic-gate	or	%l5, %lo(fcnname/**/_info), %l5;			\
1817c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
1827c478bd9Sstevel@tonic-gate	STUB_DATA(module, fcnname, install_fcn, retfcn, weak)
1837c478bd9Sstevel@tonic-gate
1847c478bd9Sstevel@tonic-gate#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
1857c478bd9Sstevel@tonic-gate	ENTRY_NP(fcnname);						\
1867c478bd9Sstevel@tonic-gate	save	%sp, -SA(MINFRAME), %sp;	/* new window */	\
1877c478bd9Sstevel@tonic-gate	set	fcnname/**/_info, %l5;					\
1887c478bd9Sstevel@tonic-gate	ld	[%l5 + MODS_FLAG], %l1;					\
1897c478bd9Sstevel@tonic-gate	btst	MODS_INSTALLED, %l1;		/* installed?? */	\
1907c478bd9Sstevel@tonic-gate	bne,a	%xcc, 1f;			/* yes */		\
1917c478bd9Sstevel@tonic-gate	ldn	[%l5], %g1;						\
1927c478bd9Sstevel@tonic-gate	btst	MODS_WEAK, %l1;			/* weak?? */		\
1937c478bd9Sstevel@tonic-gate	be,a	2f;				/* no, load module */	\
1947c478bd9Sstevel@tonic-gate	restore;							\
1957c478bd9Sstevel@tonic-gate	ldn	[%l5 + MODS_RETFCN], %g1;				\
1967c478bd9Sstevel@tonic-gate1:	jmp	%g1;				/* off we go */		\
1977c478bd9Sstevel@tonic-gate	restore;							\
1987c478bd9Sstevel@tonic-gate2:	sub	%sp, %fp, %g1;	/* get (-)size of callers frame */	\
1997c478bd9Sstevel@tonic-gate	save	%sp, %g1, %sp;	/* create new frame same size */	\
2007c478bd9Sstevel@tonic-gate	sub	%g0, %g1, %l4;  /* size of stack frame */		\
2017c478bd9Sstevel@tonic-gate	sethi	%hi(fcnname/**/_info), %l5;				\
2027c478bd9Sstevel@tonic-gate	b	stubs_common_code;					\
2037c478bd9Sstevel@tonic-gate	or	%l5, %lo(fcnname/**/_info), %l5;			\
2047c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
2057c478bd9Sstevel@tonic-gate	STUB_DATA(module, fcnname, install_fcn, retfcn, weak)
2067c478bd9Sstevel@tonic-gate
2077c478bd9Sstevel@tonic-gate#define SCALL_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
2087c478bd9Sstevel@tonic-gate	ENTRY_NP(fcnname);						\
2097c478bd9Sstevel@tonic-gate	save	%sp, -SA(MINFRAME), %sp;	/* new window */	\
2107c478bd9Sstevel@tonic-gate	set	fcnname/**/_info, %l5;					\
2117c478bd9Sstevel@tonic-gate	ld	[%l5 + MODS_FLAG], %l1;		/* installed?? */	\
2127c478bd9Sstevel@tonic-gate	btst	MODS_INSTALLED, %l1;					\
2137c478bd9Sstevel@tonic-gate	be,a	%xcc, 1f;			/* no, load module */	\
2147c478bd9Sstevel@tonic-gate	restore;							\
2157c478bd9Sstevel@tonic-gate 	ldn	[%l5], %g1;						\
2167c478bd9Sstevel@tonic-gate	jmp	%g1;				/* yes, off we go */	\
2177c478bd9Sstevel@tonic-gate	restore;							\
2187c478bd9Sstevel@tonic-gate1:	save	%sp, -SA(MINFRAME), %sp;/* new frame */			\
2197c478bd9Sstevel@tonic-gate	sub	%g0, -SA(MINFRAME), %l4;/* size of stack frame */	\
2207c478bd9Sstevel@tonic-gate	sethi	%hi(fcnname/**/_info), %l5;				\
2217c478bd9Sstevel@tonic-gate	b	stubs_common_code;					\
2227c478bd9Sstevel@tonic-gate	or	%l5, %lo(fcnname/**/_info), %l5;			\
2237c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
2247c478bd9Sstevel@tonic-gate	STUB_DATA(module, fcnname, install_fcn, retfcn, weak)
2257c478bd9Sstevel@tonic-gate
2267c478bd9Sstevel@tonic-gate	.section	".text"
2277c478bd9Sstevel@tonic-gate
2287c478bd9Sstevel@tonic-gate	/*
2297c478bd9Sstevel@tonic-gate	 * We branch here with the fcnname_info pointer in l5
2307c478bd9Sstevel@tonic-gate	 * and the frame size in %l4.
2317c478bd9Sstevel@tonic-gate	 */
2327c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_common_code)
2337c478bd9Sstevel@tonic-gate	cmp	%l4, SA(MINFRAME)
2347c478bd9Sstevel@tonic-gate	ble,a,pn %xcc, 2f
2357c478bd9Sstevel@tonic-gate	nop
2367c478bd9Sstevel@tonic-gate
2377c478bd9Sstevel@tonic-gate	sub	%l4, 0x80, %l4		/* skip locals and outs */
2387c478bd9Sstevel@tonic-gate	add	%sp, 0x80, %l0
2397c478bd9Sstevel@tonic-gate	add	%fp, 0x80, %l1		/* get original sp before save */
2407c478bd9Sstevel@tonic-gate1:
2417c478bd9Sstevel@tonic-gate	/* Copy stack frame */
2427c478bd9Sstevel@tonic-gate	ldn	[%l1 + STACK_BIAS], %l2
2437c478bd9Sstevel@tonic-gate	inc	8, %l1
2447c478bd9Sstevel@tonic-gate	stn	%l2, [%l0 + STACK_BIAS]
2457c478bd9Sstevel@tonic-gate	deccc	8, %l4
2467c478bd9Sstevel@tonic-gate	bg,a	1b
2477c478bd9Sstevel@tonic-gate	inc	8, %l0
2487c478bd9Sstevel@tonic-gate2:
2497c478bd9Sstevel@tonic-gate	call	mod_hold_stub		/* Hold the module */
2507c478bd9Sstevel@tonic-gate	mov	%l5, %o0
2517c478bd9Sstevel@tonic-gate	cmp	%o0, -1			/* if error then return error */
2527c478bd9Sstevel@tonic-gate	bne,a	1f
2537c478bd9Sstevel@tonic-gate	nop
2547c478bd9Sstevel@tonic-gate	ldn	[%l5 + MODS_RETFCN], %i0
2557c478bd9Sstevel@tonic-gate	call	%i0
2567c478bd9Sstevel@tonic-gate	nop
2577c478bd9Sstevel@tonic-gate	ret
2587c478bd9Sstevel@tonic-gate	restore	%o0, 0, %o0
2597c478bd9Sstevel@tonic-gate1:
2607c478bd9Sstevel@tonic-gate	ldn	[%l5], %g1
2617c478bd9Sstevel@tonic-gate	mov	%i0, %o0	/* copy over incoming args, if number of */
2627c478bd9Sstevel@tonic-gate	mov	%i1, %o1	/* args is > 6 then we copied them above */
2637c478bd9Sstevel@tonic-gate	mov	%i2, %o2
2647c478bd9Sstevel@tonic-gate	mov	%i3, %o3
2657c478bd9Sstevel@tonic-gate	mov	%i4, %o4
2667c478bd9Sstevel@tonic-gate	call	%g1		/* jump to the stub function */
2677c478bd9Sstevel@tonic-gate	mov	%i5, %o5
2687c478bd9Sstevel@tonic-gate	mov	%o0, %i0	/* copy any return values */
2697c478bd9Sstevel@tonic-gate	mov	%o1, %i1
2707c478bd9Sstevel@tonic-gate	call	mod_release_stub	/* release hold on module */
2717c478bd9Sstevel@tonic-gate	mov	%l5, %o0
2727c478bd9Sstevel@tonic-gate	ret			/* return to caller */
2737c478bd9Sstevel@tonic-gate	restore
2747c478bd9Sstevel@tonic-gate	SET_SIZE(stubs_common_code)
2757c478bd9Sstevel@tonic-gate
2767c478bd9Sstevel@tonic-gate! this is just a marker for the area of text that contains stubs
2777c478bd9Sstevel@tonic-gate	.seg ".text"
2787c478bd9Sstevel@tonic-gate	.global stubs_base
2797c478bd9Sstevel@tonic-gatestubs_base:
2807c478bd9Sstevel@tonic-gate	nop
2817c478bd9Sstevel@tonic-gate
2827c478bd9Sstevel@tonic-gate/*
2837c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING!!!!!!
2847c478bd9Sstevel@tonic-gate *
2857c478bd9Sstevel@tonic-gate * On the MODULE macro you MUST NOT use any spaces!!! They are
2867c478bd9Sstevel@tonic-gate * significant to the preprocessor.  With ansi c there is a way around this
2877c478bd9Sstevel@tonic-gate * but for some reason (yet to be investigated) ansi didn't work for other
2887c478bd9Sstevel@tonic-gate * reasons!
2897c478bd9Sstevel@tonic-gate *
2907c478bd9Sstevel@tonic-gate * When zero is used as the return function, the system will call
2917c478bd9Sstevel@tonic-gate * panic if the stub can't be resolved.
2927c478bd9Sstevel@tonic-gate */
2937c478bd9Sstevel@tonic-gate
2947c478bd9Sstevel@tonic-gate/*
2957c478bd9Sstevel@tonic-gate * Stubs for devfs. A non-unloadable module.
2967c478bd9Sstevel@tonic-gate */
2977c478bd9Sstevel@tonic-gate#ifndef DEVFS_MODULE
2987c478bd9Sstevel@tonic-gate	MODULE(devfs,fs);
2997c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_clean,		nomod_minus_one);
3007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_lookupname,		nomod_minus_one);
3017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_walk,		nomod_minus_one);
3027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_devpolicy,		nomod_minus_one);
3037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_reset_perm,		nomod_minus_one);
3047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_remdrv_cleanup,	nomod_minus_one);
3057c478bd9Sstevel@tonic-gate	END_MODULE(devfs);
3067c478bd9Sstevel@tonic-gate#endif
3077c478bd9Sstevel@tonic-gate
3087c478bd9Sstevel@tonic-gate/*
309facf4a8dSllai1 * Stubs for /dev fs.
310facf4a8dSllai1 */
311facf4a8dSllai1#ifndef DEV_MODULE
312facf4a8dSllai1	MODULE(dev, fs);
313facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_modctl_readdir,	nomod_minus_one);
314facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_modctl_readdir_free,	nomod_minus_one);
315facf4a8dSllai1	NO_UNLOAD_STUB(dev, devname_filename_register,	nomod_minus_one);
316facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_modctl_devexists,	nomod_minus_one);
317facf4a8dSllai1	NO_UNLOAD_STUB(dev, devname_nsmaps_register,	nomod_minus_one);
318facf4a8dSllai1	NO_UNLOAD_STUB(dev, devname_profile_update,	nomod_minus_one);
319facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_module_register,	nomod_minus_one);
320facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_devstate_change,	nomod_minus_one);
321facf4a8dSllai1	NO_UNLOAD_STUB(dev, devpts_getvnodeops,		nomod_zero);
322facf4a8dSllai1	END_MODULE(dev);
323facf4a8dSllai1#endif
324facf4a8dSllai1
325facf4a8dSllai1/*
3267c478bd9Sstevel@tonic-gate * Stubs for specfs. A non-unloadable module.
3277c478bd9Sstevel@tonic-gate */
3287c478bd9Sstevel@tonic-gate
3297c478bd9Sstevel@tonic-gate#ifndef SPEC_MODULE
3307c478bd9Sstevel@tonic-gate	MODULE(specfs,fs);
3317c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, common_specvp,  	nomod_zero);
3327c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, makectty,		nomod_zero);
3337c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, makespecvp,      	nomod_zero);
3347c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, smark,           	nomod_zero);
3357c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_segmap,     	nomod_einval);
3367c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, specfind,        	nomod_zero);
3377c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, specvp,          	nomod_zero);
3387c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, devi_stillreferenced,	nomod_zero);
3397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_getvnodeops,	nomod_zero);
3407c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_char_map,		nomod_zero);
3417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, specvp_devfs,  		nomod_zero);
3427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_assoc_vp_with_devi,	nomod_void);
3437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_hold_devi_by_vp,	nomod_zero);
3447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_snode_walk,		nomod_void);
3457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_devi_open_count,	nomod_minus_one);
3467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_is_clone,		nomod_zero);
3477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_is_selfclone,	nomod_zero);
34825e8c5aaSvikram	NO_UNLOAD_STUB(specfs, spec_fence_snode,	nomod_minus_one);
34925e8c5aaSvikram	NO_UNLOAD_STUB(specfs, spec_unfence_snode,	nomod_minus_one);
3507c478bd9Sstevel@tonic-gate	END_MODULE(specfs);
3517c478bd9Sstevel@tonic-gate#endif
3527c478bd9Sstevel@tonic-gate
3537c478bd9Sstevel@tonic-gate
3547c478bd9Sstevel@tonic-gate/*
3557c478bd9Sstevel@tonic-gate * Stubs for sockfs. A non-unloadable module.
3567c478bd9Sstevel@tonic-gate */
3577c478bd9Sstevel@tonic-gate#ifndef SOCK_MODULE
3587c478bd9Sstevel@tonic-gate	MODULE(sockfs, fs);
3597c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, so_socket,  	nomod_zero);
3607c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, so_socketpair,	nomod_zero);
3617c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, bind,  		nomod_zero);
3627c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, listen,  		nomod_zero);
3637c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, accept,  		nomod_zero);
3647c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, connect,  	nomod_zero);
3657c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, shutdown,  	nomod_zero);
3667c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, recv,  		nomod_zero);
3677c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, recvfrom,  	nomod_zero);
3687c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, recvmsg,  	nomod_zero);
3697c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, send,  		nomod_zero);
3707c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, sendmsg,  	nomod_zero);
3717c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, sendto, 		nomod_zero);
3727c478bd9Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL
3737c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, recv32,  		nomod_zero);
3747c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, recvfrom32,  	nomod_zero);
3757c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, send32,  		nomod_zero);
3767c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, sendto32, 	nomod_zero);
3777c478bd9Sstevel@tonic-gate#endif /* _SYSCALL32_IMPL */
3787c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, getpeername,  	nomod_zero);
3797c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, getsockname,  	nomod_zero);
3807c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, getsockopt,  	nomod_zero);
3817c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, setsockopt,  	nomod_zero);
3827c478bd9Sstevel@tonic-gate	SCALL_NU_STUB(sockfs, sockconfig,  	nomod_zero);
3837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sock_getmsg,  	nomod_zero);
3847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sock_putmsg,  	nomod_zero);
3857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sosendfile64,  	nomod_zero);
38674024373Spr14459	NO_UNLOAD_STUB(sockfs, snf_segmap,  	nomod_einval);
3877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sock_getfasync,  nomod_zero);
3887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, nl7c_sendfilev,  nomod_zero);
389ff550d0eSmasputra	NO_UNLOAD_STUB(sockfs, sostream_direct,	nomod_zero);
3907c478bd9Sstevel@tonic-gate	END_MODULE(sockfs);
3917c478bd9Sstevel@tonic-gate#endif
3927c478bd9Sstevel@tonic-gate
3937c478bd9Sstevel@tonic-gate/*
3947c478bd9Sstevel@tonic-gate * IPsec stubs.
3957c478bd9Sstevel@tonic-gate */
3967c478bd9Sstevel@tonic-gate
3977c478bd9Sstevel@tonic-gate#ifndef	IPSECAH_MODULE
3987c478bd9Sstevel@tonic-gate	MODULE(ipsecah,drv);
3997c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsec_construct_inverse_acquire,	nomod_zero);
4007c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_acquire,		nomod_zero);
4017c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_ill_download,	nomod_zero);
4027c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_algs_changed,	nomod_zero);
4037c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_alg_update,	nomod_zero);
4047c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_unlinkassoc,	nomod_zero);
4057c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_insertassoc,	nomod_zero);
4067c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_in_assocfailure,	nomod_zero);
4077c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_set_lpkt,		nomod_zero);
4087c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_icmp_error,	nomod_zero);
4097c478bd9Sstevel@tonic-gate	END_MODULE(ipsecah);
4107c478bd9Sstevel@tonic-gate#endif
4117c478bd9Sstevel@tonic-gate
4127c478bd9Sstevel@tonic-gate#ifndef	IPSECESP_MODULE
4137c478bd9Sstevel@tonic-gate	MODULE(ipsecesp,drv);
4147c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_fill_defs,	nomod_zero);
4157c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_algs_changed,	nomod_zero);
4167c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp, ipsecesp_in_assocfailure,	nomod_zero);
4177c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp, ipsecesp_init_funcs,	nomod_zero);
4187c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_icmp_error,	nomod_zero);
419437220cdSdanmcd	WSTUB(ipsecesp,	ipsecesp_send_keepalive,	nomod_zero);
4207c478bd9Sstevel@tonic-gate	END_MODULE(ipsecesp);
4217c478bd9Sstevel@tonic-gate#endif
4227c478bd9Sstevel@tonic-gate
4237c478bd9Sstevel@tonic-gate#ifndef KEYSOCK_MODULE
4247c478bd9Sstevel@tonic-gate	MODULE(keysock,drv);
4257c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_plumb_ipsec,	nomod_zero);
4267c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_extended_reg,	nomod_zero);
4277c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_next_seq,	nomod_zero);
4287c478bd9Sstevel@tonic-gate	END_MODULE(keysock);
4297c478bd9Sstevel@tonic-gate#endif
4307c478bd9Sstevel@tonic-gate
4317c478bd9Sstevel@tonic-gate#ifndef SPDSOCK_MODULE
4327c478bd9Sstevel@tonic-gate	MODULE(spdsock,drv);
4337c478bd9Sstevel@tonic-gate	WSTUB(spdsock,	spdsock_update_pending_algs,	nomod_zero);
4347c478bd9Sstevel@tonic-gate	END_MODULE(spdsock);
4357c478bd9Sstevel@tonic-gate#endif
4367c478bd9Sstevel@tonic-gate
4377c478bd9Sstevel@tonic-gate/*
4387c478bd9Sstevel@tonic-gate * Stubs for nfs common code.
4397c478bd9Sstevel@tonic-gate * XXX nfs_getvnodeops should go away with removal of kludge in vnode.c
4407c478bd9Sstevel@tonic-gate */
4417c478bd9Sstevel@tonic-gate#ifndef NFS_MODULE
4427c478bd9Sstevel@tonic-gate	MODULE(nfs,fs);
4437c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_getvnodeops,	nomod_zero);
4447c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_perror,		nomod_zero);
4457c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_cmn_err,		nomod_zero);
4467c478bd9Sstevel@tonic-gate	WSTUB(nfs,	clcleanup_zone,		nomod_zero);
4477c478bd9Sstevel@tonic-gate	WSTUB(nfs,	clcleanup4_zone,	nomod_zero);
4487c478bd9Sstevel@tonic-gate	END_MODULE(nfs);
4497c478bd9Sstevel@tonic-gate#endif
4507c478bd9Sstevel@tonic-gate
4517c478bd9Sstevel@tonic-gate/*
4527c478bd9Sstevel@tonic-gate * Stubs for nfs_dlboot (diskless booting).
4537c478bd9Sstevel@tonic-gate */
4547c478bd9Sstevel@tonic-gate#ifndef NFS_DLBOOT_MODULE
4557c478bd9Sstevel@tonic-gate	MODULE(nfs_dlboot,misc);
4567c478bd9Sstevel@tonic-gate	STUB(nfs_dlboot,	mount_root,	nomod_minus_one);
4577c478bd9Sstevel@tonic-gate	STUB(nfs_dlboot,        dhcpinit,       nomod_minus_one);
4587c478bd9Sstevel@tonic-gate	END_MODULE(nfs_dlboot);
4597c478bd9Sstevel@tonic-gate#endif
4607c478bd9Sstevel@tonic-gate
4617c478bd9Sstevel@tonic-gate/*
4627c478bd9Sstevel@tonic-gate * Stubs for nfs server-only code.
4637c478bd9Sstevel@tonic-gate */
4647c478bd9Sstevel@tonic-gate#ifndef NFSSRV_MODULE
4657c478bd9Sstevel@tonic-gate	MODULE(nfssrv,misc);
4667c478bd9Sstevel@tonic-gate	STUB(nfssrv,		lm_nfs3_fhtovp,	nomod_minus_one);
4677c478bd9Sstevel@tonic-gate	STUB(nfssrv,		lm_fhtovp,	nomod_minus_one);
4687c478bd9Sstevel@tonic-gate	STUB(nfssrv,		exportfs,	nomod_minus_one);
4697c478bd9Sstevel@tonic-gate	STUB(nfssrv,		nfs_getfh,	nomod_minus_one);
4707c478bd9Sstevel@tonic-gate	STUB(nfssrv,		nfsl_flush,	nomod_minus_one);
4717c478bd9Sstevel@tonic-gate	STUB(nfssrv,		rfs4_check_delegated, nomod_zero);
4721cc55349Srmesta	STUB(nfssrv,		mountd_args,	nomod_minus_one);
4737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(nfssrv,	rdma_start,	nomod_zero);
4747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(nfssrv,	nfs_svc,	nomod_zero);
4757c478bd9Sstevel@tonic-gate	END_MODULE(nfssrv);
4767c478bd9Sstevel@tonic-gate#endif
4777c478bd9Sstevel@tonic-gate
4787c478bd9Sstevel@tonic-gate/*
4797c478bd9Sstevel@tonic-gate * Stubs for kernel lock manager.
4807c478bd9Sstevel@tonic-gate */
4817c478bd9Sstevel@tonic-gate#ifndef KLM_MODULE
4827c478bd9Sstevel@tonic-gate	MODULE(klmmod,misc);
4837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_svc,		nomod_zero);
4847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_shutdown,	nomod_zero);
4857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_unexport,	nomod_zero);
4867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_cprresume,	nomod_zero);
4877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_cprsuspend,	nomod_zero);
4887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_safelock, nomod_zero);
4897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_safemap, nomod_zero);
4907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_has_sleep, nomod_zero);
4917c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_free_config, nomod_zero);
4927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_vp_active, nomod_zero);
4937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_get_sysid, nomod_zero);
4947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_rel_sysid, nomod_zero);
4957c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_alloc_sysidt, nomod_minus_one);
4967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_free_sysidt, nomod_zero);
4977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_sysidt, nomod_minus_one);
4987c478bd9Sstevel@tonic-gate	END_MODULE(klmmod);
4997c478bd9Sstevel@tonic-gate#endif
5007c478bd9Sstevel@tonic-gate
5017c478bd9Sstevel@tonic-gate#ifndef KLMOPS_MODULE
5027c478bd9Sstevel@tonic-gate	MODULE(klmops,misc);
5037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_frlock,	nomod_zero);
5047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm4_frlock,	nomod_zero);
5057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_shrlock,	nomod_zero);
5067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm4_shrlock,	nomod_zero);
5077c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm_dispatch,	nomod_zero);
5087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm4_dispatch,	nomod_zero);
5097c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm_reclaim,	nomod_zero);
5107c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm4_reclaim,	nomod_zero);
5117c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero);
5127c478bd9Sstevel@tonic-gate	END_MODULE(klmops);
5137c478bd9Sstevel@tonic-gate#endif
5147c478bd9Sstevel@tonic-gate
5157c478bd9Sstevel@tonic-gate/*
5167c478bd9Sstevel@tonic-gate * Stubs for kernel TLI module
5177c478bd9Sstevel@tonic-gate *   XXX currently we never allow this to unload
5187c478bd9Sstevel@tonic-gate */
5197c478bd9Sstevel@tonic-gate#ifndef TLI_MODULE
5207c478bd9Sstevel@tonic-gate	MODULE(tlimod,misc);
5217c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kopen,		nomod_minus_one);
5227c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kunbind,  	nomod_zero);
5237c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kadvise,  	nomod_zero);
5247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_krcvudata,  	nomod_zero);
5257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_ksndudata,  	nomod_zero);
5267c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kalloc,  	nomod_zero);
5277c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kbind,  	nomod_zero);
5287c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kclose,  	nomod_zero);
5297c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kspoll,  	nomod_zero);
5307c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod, t_kfree,  	nomod_zero);
5317c478bd9Sstevel@tonic-gate	END_MODULE(tlimod);
5327c478bd9Sstevel@tonic-gate#endif
5337c478bd9Sstevel@tonic-gate
5347c478bd9Sstevel@tonic-gate/*
5357c478bd9Sstevel@tonic-gate * Stubs for kernel RPC module
5367c478bd9Sstevel@tonic-gate *   XXX currently we never allow this to unload
5377c478bd9Sstevel@tonic-gate */
5387c478bd9Sstevel@tonic-gate#ifndef RPC_MODULE
5397c478bd9Sstevel@tonic-gate	MODULE(rpcmod,strmod);
5407c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, clnt_tli_kcreate,	nomod_minus_one);
5417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, svc_tli_kcreate,		nomod_minus_one);
5427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, bindresvport,		nomod_minus_one);
5437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, rdma_register_mod,	nomod_minus_one);
5447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod,	nomod_minus_one);
5457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, svc_queuereq,		nomod_minus_one);
5467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, clist_add,		nomod_minus_one);
5477c478bd9Sstevel@tonic-gate	END_MODULE(rpcmod);
5487c478bd9Sstevel@tonic-gate#endif
5497c478bd9Sstevel@tonic-gate
5507c478bd9Sstevel@tonic-gate/*
5517c478bd9Sstevel@tonic-gate * Stubs for des
5527c478bd9Sstevel@tonic-gate */
5537c478bd9Sstevel@tonic-gate#ifndef DES_MODULE
5547c478bd9Sstevel@tonic-gate	MODULE(des,misc);
5557c478bd9Sstevel@tonic-gate	STUB(des, cbc_crypt, 	 	nomod_zero);
5567c478bd9Sstevel@tonic-gate	STUB(des, ecb_crypt, 		nomod_zero);
5577c478bd9Sstevel@tonic-gate	STUB(des, _des_crypt,		nomod_zero);
5587c478bd9Sstevel@tonic-gate	END_MODULE(des);
5597c478bd9Sstevel@tonic-gate#endif
5607c478bd9Sstevel@tonic-gate
5617c478bd9Sstevel@tonic-gate/*
5627c478bd9Sstevel@tonic-gate * Stubs for procfs. A non-unloadable module.
5637c478bd9Sstevel@tonic-gate */
5647c478bd9Sstevel@tonic-gate#ifndef PROC_MODULE
5657c478bd9Sstevel@tonic-gate	MODULE(procfs,fs);
5667c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prfree,		nomod_zero);
5677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexit,		nomod_zero);
5687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prlwpfree,	nomod_zero);
5697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prlwpexit,	nomod_zero);
5707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prinvalidate,	nomod_zero);
5717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prnsegs,		nomod_zero);
5727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetcred,	nomod_zero);
5737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpriv,	nomod_zero);
5747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetprivsize,	nomod_zero);
5757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetstatus,	nomod_zero);
5767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpstatus,	nomod_zero);
5777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpsinfo,	nomod_zero);
5787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpsinfo,	nomod_zero);
5797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetstatus,	nomod_zero);
5807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetpsinfo,	nomod_zero);
5817c478bd9Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL
5827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetstatus32,	nomod_zero);
5837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpstatus32, nomod_zero);
5847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpsinfo32,	nomod_zero);
5857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpsinfo32,	nomod_zero);
5867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetstatus32,	nomod_zero);
5877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetpsinfo32,	nomod_zero);
5887c478bd9Sstevel@tonic-gate#endif	/* _SYSCALL32_IMPL */
5897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prnotify,	nomod_zero);
5907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexecstart,	nomod_zero);
5917c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexecend,	nomod_zero);
5927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prrelvm,		nomod_zero);
5937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prbarrier,	nomod_zero);
5947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, estimate_msacct,	nomod_zero);
5957c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getprot,	nomod_zero);
5967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getprot_done,	nomod_zero);
5977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getsegsize,	nomod_zero);
5987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_isobject,	nomod_zero);
5997c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_isself,	nomod_zero);
6007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_allstopped,	nomod_zero);
6017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_free_watched_pages, nomod_zero);
6027c478bd9Sstevel@tonic-gate	END_MODULE(procfs);
6037c478bd9Sstevel@tonic-gate#endif
6047c478bd9Sstevel@tonic-gate
6057c478bd9Sstevel@tonic-gate/*
6067c478bd9Sstevel@tonic-gate * Stubs for fifofs
6077c478bd9Sstevel@tonic-gate */
6087c478bd9Sstevel@tonic-gate#ifndef FIFO_MODULE
6097c478bd9Sstevel@tonic-gate	MODULE(fifofs,fs);
6107c478bd9Sstevel@tonic-gate	STUB(fifofs, fifovp,      	0);
6117c478bd9Sstevel@tonic-gate	STUB(fifofs, fifo_getinfo,	0);
6127c478bd9Sstevel@tonic-gate	STUB(fifofs, fifo_vfastoff,	0);
6137c478bd9Sstevel@tonic-gate	END_MODULE(fifofs);
6147c478bd9Sstevel@tonic-gate#endif
6157c478bd9Sstevel@tonic-gate
6167c478bd9Sstevel@tonic-gate/*
6177c478bd9Sstevel@tonic-gate * Stubs for ufs
6187c478bd9Sstevel@tonic-gate *
6197c478bd9Sstevel@tonic-gate * This is needed to support the old quotactl system call.
6207c478bd9Sstevel@tonic-gate * When the old sysent stuff goes away, this will need to be revisited.
6217c478bd9Sstevel@tonic-gate */
6227c478bd9Sstevel@tonic-gate#ifndef UFS_MODULE
6237c478bd9Sstevel@tonic-gate	MODULE(ufs,fs);
6247c478bd9Sstevel@tonic-gate	STUB(ufs, quotactl, nomod_minus_one);
6257c478bd9Sstevel@tonic-gate	STUB(ufs, ufs_remountroot, 0);
6267c478bd9Sstevel@tonic-gate	END_MODULE(ufs);
6277c478bd9Sstevel@tonic-gate#endif
6287c478bd9Sstevel@tonic-gate
6297c478bd9Sstevel@tonic-gate/*
630*e7cbe64fSgw25295 * Stubs for zfs
631*e7cbe64fSgw25295 */
632*e7cbe64fSgw25295#ifndef ZFS_MODULE
633*e7cbe64fSgw25295	MODULE(zfs,fs);
634*e7cbe64fSgw25295	STUB(zfs, spa_boot_init, nomod_minus_one);
635*e7cbe64fSgw25295	END_MODULE(zfs);
636*e7cbe64fSgw25295#endif
637*e7cbe64fSgw25295
638*e7cbe64fSgw25295/*
639986fd29aSsetje * Stubs for dcfs
640986fd29aSsetje */
641986fd29aSsetje#ifndef DCFS_MODULE
642986fd29aSsetje	MODULE(dcfs,fs);
643986fd29aSsetje	STUB(dcfs, decompvp, 0);
644986fd29aSsetje	END_MODULE(dcfs);
645986fd29aSsetje#endif
646986fd29aSsetje
647986fd29aSsetje/*
6487c478bd9Sstevel@tonic-gate * Stubs for namefs
6497c478bd9Sstevel@tonic-gate */
6507c478bd9Sstevel@tonic-gate#ifndef NAMEFS_MODULE
6517c478bd9Sstevel@tonic-gate	MODULE(namefs,fs);
6527c478bd9Sstevel@tonic-gate	STUB(namefs, nm_unmountall, 	0);
6537c478bd9Sstevel@tonic-gate	END_MODULE(namefs);
6547c478bd9Sstevel@tonic-gate#endif
6557c478bd9Sstevel@tonic-gate
6567c478bd9Sstevel@tonic-gate/*
6577c478bd9Sstevel@tonic-gate * Stubs for ts_dptbl
6587c478bd9Sstevel@tonic-gate */
6597c478bd9Sstevel@tonic-gate#ifndef TS_DPTBL_MODULE
6607c478bd9Sstevel@tonic-gate	MODULE(TS_DPTBL,sched);
6617c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getdptbl,		0);
6627c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getkmdpris,		0);
6637c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getmaxumdpri,	0);
6647c478bd9Sstevel@tonic-gate	END_MODULE(TS_DPTBL);
6657c478bd9Sstevel@tonic-gate#endif
6667c478bd9Sstevel@tonic-gate
6677c478bd9Sstevel@tonic-gate/*
6687c478bd9Sstevel@tonic-gate * Stubs for rt_dptbl
6697c478bd9Sstevel@tonic-gate */
6707c478bd9Sstevel@tonic-gate#ifndef RT_DPTBL_MODULE
6717c478bd9Sstevel@tonic-gate	MODULE(RT_DPTBL,sched);
6727c478bd9Sstevel@tonic-gate	STUB(RT_DPTBL, rt_getdptbl,		0);
6737c478bd9Sstevel@tonic-gate	END_MODULE(RT_DPTBL);
6747c478bd9Sstevel@tonic-gate#endif
6757c478bd9Sstevel@tonic-gate
6767c478bd9Sstevel@tonic-gate/*
6777c478bd9Sstevel@tonic-gate * Stubs for ia_dptbl
6787c478bd9Sstevel@tonic-gate */
6797c478bd9Sstevel@tonic-gate#ifndef IA_DPTBL_MODULE
6807c478bd9Sstevel@tonic-gate	MODULE(IA_DPTBL,sched);
6817c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getdptbl,		0);
6827c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getkmdpris,		0);
6837c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getmaxumdpri,	0);
6847c478bd9Sstevel@tonic-gate	END_MODULE(IA_DPTBL);
6857c478bd9Sstevel@tonic-gate#endif
6867c478bd9Sstevel@tonic-gate
6877c478bd9Sstevel@tonic-gate/*
6887c478bd9Sstevel@tonic-gate * Stubs for FSS scheduler
6897c478bd9Sstevel@tonic-gate */
6907c478bd9Sstevel@tonic-gate#ifndef	FSS_MODULE
6917c478bd9Sstevel@tonic-gate	MODULE(FSS,sched);
6927c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_allocbuf,		nomod_zero);
6937c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_freebuf,			nomod_zero);
6947c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_changeproj,		nomod_zero);
6957c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_changepset,		nomod_zero);
6967c478bd9Sstevel@tonic-gate	END_MODULE(FSS);
6977c478bd9Sstevel@tonic-gate#endif
6987c478bd9Sstevel@tonic-gate
6997c478bd9Sstevel@tonic-gate/*
7007c478bd9Sstevel@tonic-gate * Stubs for fx_dptbl
7017c478bd9Sstevel@tonic-gate */
7027c478bd9Sstevel@tonic-gate#ifndef FX_DPTBL_MODULE
7037c478bd9Sstevel@tonic-gate	MODULE(FX_DPTBL,sched);
7047c478bd9Sstevel@tonic-gate	STUB(FX_DPTBL, fx_getdptbl,		0);
7057c478bd9Sstevel@tonic-gate	STUB(FX_DPTBL, fx_getmaxumdpri,		0);
7067c478bd9Sstevel@tonic-gate	END_MODULE(FX_DPTBL);
7077c478bd9Sstevel@tonic-gate#endif
7087c478bd9Sstevel@tonic-gate
7097c478bd9Sstevel@tonic-gate/*
7107c478bd9Sstevel@tonic-gate * Stubs for kb (only needed for 'win')
7117c478bd9Sstevel@tonic-gate */
7127c478bd9Sstevel@tonic-gate#ifndef KB_MODULE
7137c478bd9Sstevel@tonic-gate	MODULE(kb,strmod);
7147c478bd9Sstevel@tonic-gate	STUB(kb, strsetwithdecimal,	0);
7157c478bd9Sstevel@tonic-gate	END_MODULE(kb);
7167c478bd9Sstevel@tonic-gate#endif
7177c478bd9Sstevel@tonic-gate
7187c478bd9Sstevel@tonic-gate/*
7197c478bd9Sstevel@tonic-gate * Stubs for swapgeneric
7207c478bd9Sstevel@tonic-gate */
7217c478bd9Sstevel@tonic-gate#ifndef SWAPGENERIC_MODULE
7227c478bd9Sstevel@tonic-gate	MODULE(swapgeneric,misc);
7237c478bd9Sstevel@tonic-gate	STUB(swapgeneric, rootconf,     0);
7247c478bd9Sstevel@tonic-gate	STUB(swapgeneric, svm_rootconf, 0);
7257c478bd9Sstevel@tonic-gate	STUB(swapgeneric, getfstype,    0);
7267c478bd9Sstevel@tonic-gate	STUB(swapgeneric, getrootdev,   0);
7277c478bd9Sstevel@tonic-gate	STUB(swapgeneric, getfsname,    0);
7287c478bd9Sstevel@tonic-gate	STUB(swapgeneric, loadrootmodules, 0);
7297c478bd9Sstevel@tonic-gate	END_MODULE(swapgeneric);
7307c478bd9Sstevel@tonic-gate#endif
7317c478bd9Sstevel@tonic-gate
7327c478bd9Sstevel@tonic-gate/*
7337c478bd9Sstevel@tonic-gate * Stubs for bootdev
7347c478bd9Sstevel@tonic-gate */
7357c478bd9Sstevel@tonic-gate#ifndef BOOTDEV_MODULE
7367c478bd9Sstevel@tonic-gate	MODULE(bootdev,misc);
7377c478bd9Sstevel@tonic-gate	STUB(bootdev, i_devname_to_promname, 0);
7387c478bd9Sstevel@tonic-gate	STUB(bootdev, i_promname_to_devname, 0);
7397c478bd9Sstevel@tonic-gate	STUB(bootdev, i_convert_boot_device_name, 0);
7407c478bd9Sstevel@tonic-gate	END_MODULE(bootdev);
7417c478bd9Sstevel@tonic-gate#endif
7427c478bd9Sstevel@tonic-gate
7437c478bd9Sstevel@tonic-gate/*
7447c478bd9Sstevel@tonic-gate * stubs for strplumb...
7457c478bd9Sstevel@tonic-gate */
7467c478bd9Sstevel@tonic-gate#ifndef STRPLUMB_MODULE
7477c478bd9Sstevel@tonic-gate	MODULE(strplumb,misc);
7487c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb,     0);
7497c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb_load, 0);
750a9ddc71cSsetje	STUB(strplumb, strplumb_get_netdev_path, 0)
7517c478bd9Sstevel@tonic-gate	END_MODULE(strplumb);
7527c478bd9Sstevel@tonic-gate#endif
7537c478bd9Sstevel@tonic-gate
7547c478bd9Sstevel@tonic-gate/*
7557c478bd9Sstevel@tonic-gate * Stubs for console configuration module
7567c478bd9Sstevel@tonic-gate */
7577c478bd9Sstevel@tonic-gate#ifndef CONSCONFIG_MODULE
7587c478bd9Sstevel@tonic-gate	MODULE(consconfig,misc);
7597c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig,	0);
7607c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig_get_usb_kb_path,	0);
7617c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig_get_usb_ms_path,	0);
7627c478bd9Sstevel@tonic-gate	END_MODULE(consconfig);
7637c478bd9Sstevel@tonic-gate#endif
7647c478bd9Sstevel@tonic-gate
7657c478bd9Sstevel@tonic-gate/*
7667c478bd9Sstevel@tonic-gate * Stubs for zs (uart) module
7677c478bd9Sstevel@tonic-gate */
7687c478bd9Sstevel@tonic-gate#ifndef ZS_MODULE
7697c478bd9Sstevel@tonic-gate	MODULE(zs,drv);
7707c478bd9Sstevel@tonic-gate	STUB(zs, zsgetspeed,		0);
7717c478bd9Sstevel@tonic-gate	END_MODULE(zs);
7727c478bd9Sstevel@tonic-gate#endif
7737c478bd9Sstevel@tonic-gate
7747c478bd9Sstevel@tonic-gate/*
7757c478bd9Sstevel@tonic-gate * Stubs for accounting.
7767c478bd9Sstevel@tonic-gate */
7777c478bd9Sstevel@tonic-gate#ifndef SYSACCT_MODULE
7787c478bd9Sstevel@tonic-gate	MODULE(sysacct,sys);
7797c478bd9Sstevel@tonic-gate	WSTUB(sysacct, acct,  		nomod_zero);
7807c478bd9Sstevel@tonic-gate	WSTUB(sysacct, acct_fs_in_use,	nomod_zero);
7817c478bd9Sstevel@tonic-gate	END_MODULE(sysacct);
7827c478bd9Sstevel@tonic-gate#endif
7837c478bd9Sstevel@tonic-gate
7847c478bd9Sstevel@tonic-gate/*
7857c478bd9Sstevel@tonic-gate * Stubs for semaphore routines. sem.c
7867c478bd9Sstevel@tonic-gate */
7877c478bd9Sstevel@tonic-gate#ifndef SEMSYS_MODULE
7887c478bd9Sstevel@tonic-gate	MODULE(semsys,sys);
7897c478bd9Sstevel@tonic-gate	WSTUB(semsys, semexit,		nomod_zero);
7907c478bd9Sstevel@tonic-gate	END_MODULE(semsys);
7917c478bd9Sstevel@tonic-gate#endif
7927c478bd9Sstevel@tonic-gate
7937c478bd9Sstevel@tonic-gate/*
7947c478bd9Sstevel@tonic-gate * Stubs for shmem routines. shm.c
7957c478bd9Sstevel@tonic-gate */
7967c478bd9Sstevel@tonic-gate#ifndef SHMSYS_MODULE
7977c478bd9Sstevel@tonic-gate	MODULE(shmsys,sys);
7987c478bd9Sstevel@tonic-gate	WSTUB(shmsys, shmexit,		nomod_zero);
7997c478bd9Sstevel@tonic-gate	WSTUB(shmsys, shmfork,		nomod_zero);
80030da1432Sahl	WSTUB(shmsys, shmgetid,		nomod_minus_one);
8017c478bd9Sstevel@tonic-gate	END_MODULE(shmsys);
8027c478bd9Sstevel@tonic-gate#endif
8037c478bd9Sstevel@tonic-gate
8047c478bd9Sstevel@tonic-gate/*
8057c478bd9Sstevel@tonic-gate * Stubs for doors
8067c478bd9Sstevel@tonic-gate */
8077c478bd9Sstevel@tonic-gate#ifndef DOORFS_MODULE
8087c478bd9Sstevel@tonic-gate	MODULE(doorfs,sys);
8097c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_slam,			nomod_zero);
8107c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_exit,			nomod_zero);
8117c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_revoke_all,			nomod_zero);
8127c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_fork,			nomod_zero);
8137c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_upcall,		nomod_einval);
8147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_create,		nomod_einval);
8157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_open,		nomod_einval);
8167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_lookup,		nomod_zero);
8177c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_upcall,			nomod_einval);
818024b0a25Sseb	WSTUB(doorfs, door_ki_upcall_cred,		nomod_einval);
8197c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_hold,			nomod_zero);
8207c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_rele,			nomod_zero);
8217c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_info,			nomod_einval);
8227c478bd9Sstevel@tonic-gate	END_MODULE(doorfs);
8237c478bd9Sstevel@tonic-gate#endif
8247c478bd9Sstevel@tonic-gate
8257c478bd9Sstevel@tonic-gate/*
826c5c4113dSnw141292 * Stubs for idmap
827c5c4113dSnw141292 */
828c5c4113dSnw141292#ifndef IDMAP_MODULE
829c5c4113dSnw141292	MODULE(idmap,misc);
830c5c4113dSnw141292	STUB(idmap, kidmap_batch_getgidbysid,	nomod_zero);
831c5c4113dSnw141292	STUB(idmap, kidmap_batch_getpidbysid,	nomod_zero);
832c5c4113dSnw141292	STUB(idmap, kidmap_batch_getsidbygid,	nomod_zero);
833c5c4113dSnw141292	STUB(idmap, kidmap_batch_getsidbyuid,	nomod_zero);
834c5c4113dSnw141292	STUB(idmap, kidmap_batch_getuidbysid,	nomod_zero);
835c5c4113dSnw141292	STUB(idmap, kidmap_get_create,		nomod_zero);
836c5c4113dSnw141292	STUB(idmap, kidmap_get_destroy,		nomod_zero);
837c5c4113dSnw141292	STUB(idmap, kidmap_get_mappings,	nomod_zero);
838c5c4113dSnw141292	STUB(idmap, kidmap_getgidbysid,		nomod_zero);
839c5c4113dSnw141292	STUB(idmap, kidmap_getpidbysid,		nomod_zero);
840c5c4113dSnw141292	STUB(idmap, kidmap_getsidbygid,		nomod_zero);
841c5c4113dSnw141292	STUB(idmap, kidmap_getsidbyuid,		nomod_zero);
842c5c4113dSnw141292	STUB(idmap, kidmap_getuidbysid,		nomod_zero);
843c5c4113dSnw141292	STUB(idmap, idmap_get_door,		nomod_einval);
844c5c4113dSnw141292	STUB(idmap, idmap_unreg_dh,		nomod_einval);
845c5c4113dSnw141292	STUB(idmap, idmap_reg_dh,		nomod_einval);
846bda89588Sjp151216	STUB(idmap, idmap_purge_cache,		nomod_einval);
847c5c4113dSnw141292	END_MODULE(idmap);
848c5c4113dSnw141292#endif
849c5c4113dSnw141292
850c5c4113dSnw141292/*
8517c478bd9Sstevel@tonic-gate * Stubs for dma routines. dmaga.c
8527c478bd9Sstevel@tonic-gate * (These are only needed for cross-checks, not autoloading)
8537c478bd9Sstevel@tonic-gate */
8547c478bd9Sstevel@tonic-gate#ifndef DMA_MODULE
8557c478bd9Sstevel@tonic-gate	MODULE(dma,drv);
8567c478bd9Sstevel@tonic-gate	WSTUB(dma, dma_alloc,		nomod_zero); /* (DMAGA *)0 */
8577c478bd9Sstevel@tonic-gate	WSTUB(dma, dma_free,		nomod_zero); /* (DMAGA *)0 */
8587c478bd9Sstevel@tonic-gate	END_MODULE(dma);
8597c478bd9Sstevel@tonic-gate#endif
8607c478bd9Sstevel@tonic-gate
8617c478bd9Sstevel@tonic-gate/*
8627c478bd9Sstevel@tonic-gate * Stubs for auditing.
8637c478bd9Sstevel@tonic-gate */
8647c478bd9Sstevel@tonic-gate#ifndef C2AUDIT_MODULE
8657c478bd9Sstevel@tonic-gate	MODULE(c2audit,sys);
8667c478bd9Sstevel@tonic-gate	STUB(c2audit,  audit_init,			nomod_zero);
8677c478bd9Sstevel@tonic-gate	STUB(c2audit,  _auditsys,			nomod_zero);
8687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_free,		nomod_zero);
8697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_start, 		nomod_zero);
8707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_finish,		nomod_zero);
8717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_newproc,		nomod_zero);
8727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_pfree,		nomod_zero);
8737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_thread_free,	nomod_zero);
8747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_thread_create,	nomod_zero);
8757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_falloc,		nomod_zero);
8767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_unfalloc,		nomod_zero);
8777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_closef,		nomod_zero);
8787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_copen,		nomod_zero);
8797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_core_start,	nomod_zero);
8807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_core_finish,	nomod_zero);
8817c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_stropen,		nomod_zero);
8827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strclose,		nomod_zero);
8837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strioctl,		nomod_zero);
8847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strputmsg,	nomod_zero);
8857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_c2_revoke,	nomod_zero);
8867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_savepath,		nomod_zero);
8877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_anchorpath,	nomod_zero);
8887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_addcomponent,	nomod_zero);
8897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exit,		nomod_zero);
8907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exec,		nomod_zero);
8917c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_symlink,		nomod_zero);
8927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_symlink_create,	nomod_zero);
8937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_vncreate_start,	nomod_zero);
8947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_vncreate_finish,	nomod_zero);
8957c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_enterprom,	nomod_zero);
8967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exitprom,		nomod_zero);
8977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_chdirec,		nomod_zero);
8987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_getf,		nomod_zero);
8997c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setf,		nomod_zero);
9007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_sock,		nomod_zero);
9017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strgetmsg,	nomod_zero);
9027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_ipc,		nomod_zero);
9037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_ipcget,		nomod_zero);
9047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_lookupname,	nomod_zero);
9057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_pathcomp,		nomod_zero);
9067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_fdsend,		nomod_zero);
9077c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_fdrecv,		nomod_zero);
9087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_priv,		nomod_zero);
9097c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setppriv,		nomod_zero);
9107c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_devpolicy,	nomod_zero);
9117c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setfsat_path,	nomod_zero);
9127c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_cryptoadm,	nomod_zero);
9137c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_update_context,	nomod_zero);
914c28749e9Skais	NO_UNLOAD_STUB(c2audit, audit_kssl,		nomod_zero);
915799bd290Spwernau	NO_UNLOAD_STUB(c2audit, audit_pf_policy,	nomod_zero);
9167c478bd9Sstevel@tonic-gate	END_MODULE(c2audit);
9177c478bd9Sstevel@tonic-gate#endif
9187c478bd9Sstevel@tonic-gate
9197c478bd9Sstevel@tonic-gate/*
9207c478bd9Sstevel@tonic-gate * Stubs for kernel rpc security service module
9217c478bd9Sstevel@tonic-gate */
9227c478bd9Sstevel@tonic-gate#ifndef RPCSEC_MODULE
9237c478bd9Sstevel@tonic-gate	MODULE(rpcsec,misc);
9247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_clnt_revoke,		nomod_zero);
9257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, authkern_create,		nomod_zero);
9267c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_svc_msg,		nomod_zero);
9277c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_svc_control,		nomod_zero);
9287c478bd9Sstevel@tonic-gate	END_MODULE(rpcsec);
9297c478bd9Sstevel@tonic-gate#endif
9307c478bd9Sstevel@tonic-gate
9317c478bd9Sstevel@tonic-gate/*
9327c478bd9Sstevel@tonic-gate * Stubs for rpc RPCSEC_GSS security service module
9337c478bd9Sstevel@tonic-gate */
9347c478bd9Sstevel@tonic-gate#ifndef RPCSEC_GSS_MODULE
9357c478bd9Sstevel@tonic-gate	MODULE(rpcsec_gss,misc);
9367c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, __svcrpcsec_gss,		nomod_zero);
9377c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_getcred,		nomod_zero);
9387c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_callback,	nomod_zero);
9397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secget,		nomod_zero);
9407c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secfree,		nomod_zero);
9417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_seccreate,		nomod_zero);
9427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_defaults,	nomod_zero);
9437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_revauth,		nomod_zero);
9447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secpurge,		nomod_zero);
9457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_cleanup,		nomod_zero);
9467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_versions,	nomod_zero);
9477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_max_data_length,	nomod_zero);
9487c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_svc_max_data_length,	nomod_zero);
9497c478bd9Sstevel@tonic-gate	END_MODULE(rpcsec_gss);
9507c478bd9Sstevel@tonic-gate#endif
9517c478bd9Sstevel@tonic-gate
9527c478bd9Sstevel@tonic-gate#ifndef IWSCN_MODULE
9537c478bd9Sstevel@tonic-gate	MODULE(iwscn,drv);
9547c478bd9Sstevel@tonic-gate	STUB(iwscn, srpop, 0);
9557c478bd9Sstevel@tonic-gate	END_MODULE(iwscn);
9567c478bd9Sstevel@tonic-gate#endif
9577c478bd9Sstevel@tonic-gate
9587c478bd9Sstevel@tonic-gate/*
9597c478bd9Sstevel@tonic-gate * Stubs for checkpoint-resume module
9607c478bd9Sstevel@tonic-gate */
9617c478bd9Sstevel@tonic-gate#ifndef CPR_MODULE
9627c478bd9Sstevel@tonic-gate        MODULE(cpr,misc);
9637c478bd9Sstevel@tonic-gate        STUB(cpr, cpr, 0);
9647c478bd9Sstevel@tonic-gate        END_MODULE(cpr);
9657c478bd9Sstevel@tonic-gate#endif
9667c478bd9Sstevel@tonic-gate
9677c478bd9Sstevel@tonic-gate/*
9687c478bd9Sstevel@tonic-gate * Stubs for VIS module
9697c478bd9Sstevel@tonic-gate */
9707c478bd9Sstevel@tonic-gate#ifndef VIS_MODULE
9717c478bd9Sstevel@tonic-gate        MODULE(vis,misc);
9727c478bd9Sstevel@tonic-gate        STUB(vis, vis_fpu_simulator, 0);
9737c478bd9Sstevel@tonic-gate        STUB(vis, vis_fldst, 0);
9747c478bd9Sstevel@tonic-gate        STUB(vis, vis_rdgsr, 0);
9757c478bd9Sstevel@tonic-gate        STUB(vis, vis_wrgsr, 0);
9767c478bd9Sstevel@tonic-gate        END_MODULE(vis);
9777c478bd9Sstevel@tonic-gate#endif
9787c478bd9Sstevel@tonic-gate
9797c478bd9Sstevel@tonic-gate/*
9807c478bd9Sstevel@tonic-gate * Stubs for kernel probes (tnf module).  Not unloadable.
9817c478bd9Sstevel@tonic-gate */
9827c478bd9Sstevel@tonic-gate#ifndef TNF_MODULE
9837c478bd9Sstevel@tonic-gate	MODULE(tnf,drv);
9847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_ref32_1,	nomod_zero);
9857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_string_1,	nomod_zero);
9867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_opaque_array_1,	nomod_zero);
9877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_opaque32_array_1, nomod_zero);
9887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_struct_tag_1,	nomod_zero);
9897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_allocate,	nomod_zero);
9907c478bd9Sstevel@tonic-gate	END_MODULE(tnf);
9917c478bd9Sstevel@tonic-gate#endif
9927c478bd9Sstevel@tonic-gate
9937c478bd9Sstevel@tonic-gate/*
9947c478bd9Sstevel@tonic-gate * Clustering: stubs for bootstrapping.
9957c478bd9Sstevel@tonic-gate */
9967c478bd9Sstevel@tonic-gate#ifndef CL_BOOTSTRAP
9977c478bd9Sstevel@tonic-gate	MODULE(cl_bootstrap,misc);
9987c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_modload, nomod_minus_one);
9997c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_loadrootmodules, nomod_zero);
10007c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_rootconf, nomod_zero);
10017c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_mountroot, nomod_zero);
10027c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_init, nomod_zero);
10037c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_get_nodeid, nomod_zero);
10047c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_maximum_nodeid, nomod_zero);
10057c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, cluster, nomod_zero);
10067c478bd9Sstevel@tonic-gate	END_MODULE(cl_bootstrap);
10077c478bd9Sstevel@tonic-gate#endif
10087c478bd9Sstevel@tonic-gate
10097c478bd9Sstevel@tonic-gate/*
10107c478bd9Sstevel@tonic-gate * Clustering: stubs for cluster infrastructure.
10117c478bd9Sstevel@tonic-gate */
10127c478bd9Sstevel@tonic-gate#ifndef CL_COMM_MODULE
10137c478bd9Sstevel@tonic-gate	MODULE(cl_comm,misc);
10147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(cl_comm, cladmin, nomod_minus_one);
10157c478bd9Sstevel@tonic-gate	END_MODULE(cl_comm);
10167c478bd9Sstevel@tonic-gate#endif
10177c478bd9Sstevel@tonic-gate
10187c478bd9Sstevel@tonic-gate/*
10197c478bd9Sstevel@tonic-gate * Clustering: stubs for global file system operations.
10207c478bd9Sstevel@tonic-gate */
10217c478bd9Sstevel@tonic-gate#ifndef PXFS_MODULE
10227c478bd9Sstevel@tonic-gate	MODULE(pxfs,fs);
10237c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_read, nomod_zero);
10247c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_write, nomod_zero);
10257c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, cl_flk_state_transition_notify, nomod_zero);
10267c478bd9Sstevel@tonic-gate	END_MODULE(pxfs);
10277c478bd9Sstevel@tonic-gate#endif
10287c478bd9Sstevel@tonic-gate
10297c478bd9Sstevel@tonic-gate/*
1030b65731f1Skini * Stubs for PCI configurator module (misc/pcicfg.e).
10317c478bd9Sstevel@tonic-gate */
1032b65731f1Skini#ifndef	PCICFG_E_MODULE
1033b65731f1Skini	MODULE(pcicfg.e,misc);
1034b65731f1Skini	STUB(pcicfg.e, pcicfg_configure, 0);
1035b65731f1Skini	STUB(pcicfg.e, pcicfg_unconfigure, 0);
1036b65731f1Skini	END_MODULE(pcicfg.e);
1037b65731f1Skini#endif
1038b65731f1Skini
1039b65731f1Skini/*
1040b65731f1Skini * Stubs for PCIEHPC (pci-ex hot plug support) module (misc/pciehpc).
1041b65731f1Skini */
1042b65731f1Skini#ifndef	PCIEHPC_MODULE
1043b65731f1Skini	MODULE(pciehpc,misc);
1044b65731f1Skini	STUB(pciehpc, pciehpc_init, 0);
1045b65731f1Skini	STUB(pciehpc, pciehpc_uninit, 0);
1046b65731f1Skini	WSTUB(pciehpc, pciehpc_intr, 0);
1047b65731f1Skini	END_MODULE(pciehpc);
1048b65731f1Skini#endif
1049b65731f1Skini
1050b65731f1Skini/*
1051b65731f1Skini * Stubs for PCISHPC (pci/pci-x shpc hot plug support) module (misc/pcishpc).
1052b65731f1Skini */
1053b65731f1Skini#ifndef	PCISHPC_MODULE
1054b65731f1Skini	MODULE(pcishpc,misc);
1055b65731f1Skini	STUB(pcishpc, pcishpc_init, 0);
1056b65731f1Skini	STUB(pcishpc, pcishpc_uninit, 0);
1057b65731f1Skini	WSTUB(pcishpc, pcishpc_intr, 0);
1058b65731f1Skini	END_MODULE(pcishpc);
10597c478bd9Sstevel@tonic-gate#endif
10607c478bd9Sstevel@tonic-gate
10617c478bd9Sstevel@tonic-gate#ifndef PCIHP_MODULE
10627c478bd9Sstevel@tonic-gate	MODULE(pcihp,misc);
10637c478bd9Sstevel@tonic-gate	WSTUB(pcihp, pcihp_init, nomod_minus_one);
10647c478bd9Sstevel@tonic-gate	WSTUB(pcihp, pcihp_uninit, nomod_minus_one);
10657c478bd9Sstevel@tonic-gate	WSTUB(pcihp, pcihp_info, nomod_minus_one);
10667c478bd9Sstevel@tonic-gate	WSTUB(pcihp, pcihp_get_cb_ops, nomod_zero);
10677c478bd9Sstevel@tonic-gate	END_MODULE(pcihp);
10687c478bd9Sstevel@tonic-gate#endif
10697c478bd9Sstevel@tonic-gate
10707c478bd9Sstevel@tonic-gate/*
10717c478bd9Sstevel@tonic-gate * Stubs for kernel cryptographic framework module (misc/kcf).
10727c478bd9Sstevel@tonic-gate */
10737c478bd9Sstevel@tonic-gate#ifndef KCF_MODULE
10747c478bd9Sstevel@tonic-gate	MODULE(kcf,misc);
10757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mech2id, nomod_minus_one);
10767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_register_provider, nomod_minus_one);
10777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unregister_provider, nomod_minus_one);
10787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_provider_notification, nomod_minus_one);
10797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_op_notification, nomod_minus_one);
10807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_kmflag, nomod_minus_one);
10817c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest, nomod_minus_one);
1082894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_prov, nomod_minus_one);
10837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_init, nomod_minus_one);
1084894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_init_prov, nomod_minus_one);
10857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_update, nomod_minus_one);
10867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_final, nomod_minus_one);
1087894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_key_prov, nomod_minus_one);
10887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt, nomod_minus_one);
1089894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_prov, nomod_minus_one);
10907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_init, nomod_minus_one);
1091894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_init_prov, nomod_minus_one);
10927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_update, nomod_minus_one);
10937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_final, nomod_minus_one);
10947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt, nomod_minus_one);
1095894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_decrypt_prov, nomod_minus_one);
10967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_init, nomod_minus_one);
1097894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_decrypt_init_prov, nomod_minus_one);
10987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_update, nomod_minus_one);
10997c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_final, nomod_minus_one);
11007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_get_all_mech_info, nomod_minus_one);
1101894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_check, nomod_minus_one);
1102894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_check_prov, nomod_minus_one);
1103894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_derive, nomod_minus_one);
1104894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_generate, nomod_minus_one);
1105894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_generate_pair, nomod_minus_one);
1106894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_unwrap, nomod_minus_one);
1107894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_wrap, nomod_minus_one);
11087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac, nomod_minus_one);
1109894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_prov, nomod_minus_one);
11107c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_verify, nomod_minus_one);
1111894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_verify_prov, nomod_minus_one);
11127c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_init, nomod_minus_one);
1113894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_init_prov, nomod_minus_one);
11147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_update, nomod_minus_one);
11157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_final, nomod_minus_one);
11167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt, nomod_minus_one);
1117894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_prov, nomod_minus_one);
11187c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt, nomod_minus_one);
1119894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt_prov, nomod_minus_one);
11207c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init, nomod_minus_one);
1121894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init_prov, nomod_minus_one);
11227c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_update, nomod_minus_one);
11237c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_final, nomod_minus_one);
1124894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_copy, nomod_minus_one);
1125894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_create, nomod_minus_one);
1126894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_destroy, nomod_minus_one);
1127894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find_final, nomod_minus_one);
1128894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find_init, nomod_minus_one);
1129894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find, nomod_minus_one);
1130894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_get_attribute_value, nomod_minus_one);
1131894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_get_size, nomod_minus_one);
1132894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_set_attribute_value, nomod_minus_one);
1133894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_close, nomod_minus_one);
1134894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_login, nomod_minus_one);
1135894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_logout, nomod_minus_one);
1136894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_open, nomod_minus_one);
11377c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac, nomod_minus_one);
1138894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_prov, nomod_minus_one);
11397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init, nomod_minus_one);
1140894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init_prov, nomod_minus_one);
11417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_update, nomod_minus_one);
11427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_final, nomod_minus_one);
11437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_create_ctx_template, nomod_minus_one);
11447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_destroy_ctx_template, nomod_minus_one);
11457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_get_mech_list, nomod_minus_one);
11467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_free_mech_list, nomod_minus_one);
11477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_cancel_req, nomod_minus_one);
11487c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_cancel_ctx, nomod_minus_one);
11497c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall_alloc, nomod_minus_one);
11507c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall_free, nomod_minus_one);
11517c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall, nomod_minus_one);
11527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unbufcall, nomod_minus_one);
11537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_notify_events, nomod_minus_one);
11547c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unnotify_events, nomod_minus_one);
1155894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_get_provider, nomod_minus_one);
1156c892ebf1Skrishna	NO_UNLOAD_STUB(kcf, crypto_get_provinfo, nomod_minus_one);
1157894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_release_provider, nomod_minus_one);
11587c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign, nomod_minus_one);
1159894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_prov, nomod_minus_one);
11607c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_init, nomod_minus_one);
1161894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_init_prov, nomod_minus_one);
11627c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_update, nomod_minus_one);
11637c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_final, nomod_minus_one);
11647c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_recover, nomod_minus_one);
1165894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_recover_prov, nomod_minus_one);
1166894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_recover_init_prov, nomod_minus_one);
11677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify, nomod_minus_one);
1168894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_prov, nomod_minus_one);
11697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_init, nomod_minus_one);
1170894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_init_prov, nomod_minus_one);
11717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_update, nomod_minus_one);
11727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_final, nomod_minus_one);
11737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_recover, nomod_minus_one);
1174894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_recover_prov, nomod_minus_one);
1175894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_recover_init_prov, nomod_minus_one);
11767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_add_entropy, nomod_minus_one);
11777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_get_bytes, nomod_minus_one);
11787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_get_pseudo_bytes, nomod_minus_one);
11797c478bd9Sstevel@tonic-gate	END_MODULE(kcf);
11807c478bd9Sstevel@tonic-gate#endif
11817c478bd9Sstevel@tonic-gate
11827c478bd9Sstevel@tonic-gate/*
11837c478bd9Sstevel@tonic-gate * Stubs for sha1. A non-unloadable module.
11847c478bd9Sstevel@tonic-gate */
11857c478bd9Sstevel@tonic-gate#ifndef SHA1_MODULE
11867c478bd9Sstevel@tonic-gate	MODULE(sha1,crypto);
11877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Init, nomod_void);
11887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Update, nomod_void);
11897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Final,	nomod_void);
11907c478bd9Sstevel@tonic-gate	END_MODULE(sha1);
11917c478bd9Sstevel@tonic-gate#endif
11927c478bd9Sstevel@tonic-gate
1193210db224Sericheng/*
1194210db224Sericheng * The following stubs are used by the mac module.
1195d62bc4baSyz147064 * Since dld already depends on mac, these
1196210db224Sericheng * stubs are needed to avoid circular dependencies.
1197210db224Sericheng */
11987c478bd9Sstevel@tonic-gate#ifndef	DLD_MODULE
11997c478bd9Sstevel@tonic-gate	MODULE(dld,drv);
1200210db224Sericheng	STUB(dld, dld_init_ops, nomod_void);
1201210db224Sericheng	STUB(dld, dld_fini_ops, nomod_void);
1202d62bc4baSyz147064	STUB(dld, dld_autopush, nomod_minus_one);
12037c478bd9Sstevel@tonic-gate	END_MODULE(dld);
12047c478bd9Sstevel@tonic-gate#endif
12057c478bd9Sstevel@tonic-gate
1206d62bc4baSyz147064/*
1207d62bc4baSyz147064 * The following stubs are used by the mac module.
1208d62bc4baSyz147064 * Since dls already depends on mac, these
1209d62bc4baSyz147064 * stubs are needed to avoid circular dependencies.
1210d62bc4baSyz147064 */
1211d62bc4baSyz147064#ifndef	DLS_MODULE
1212d62bc4baSyz147064	MODULE(dls,misc);
1213d62bc4baSyz147064	STUB(dls, dls_devnet_vid, nomod_zero);
1214d62bc4baSyz147064	STUB(dls, dls_devnet_mac, nomod_zero);
1215d62bc4baSyz147064	STUB(dls, dls_devnet_hold_tmp, nomod_einval);
1216d62bc4baSyz147064	STUB(dls, dls_devnet_rele_tmp, nomod_void);
1217d62bc4baSyz147064	STUB(dls, dls_mgmt_get_linkid, nomod_einval);
1218d62bc4baSyz147064	END_MODULE(dls);
1219d62bc4baSyz147064#endif
1220d62bc4baSyz147064
1221d62bc4baSyz147064#ifndef SOFTMAC_MODULE
1222d62bc4baSyz147064	MODULE(softmac,drv);
1223d62bc4baSyz147064	STUB(softmac, softmac_hold_device, nomod_einval);
1224d62bc4baSyz147064	STUB(softmac, softmac_rele_device, nomod_void);
1225d62bc4baSyz147064	STUB(softmac, softmac_recreate, nomod_void);
1226d62bc4baSyz147064	END_MODULE(softmac);
1227d62bc4baSyz147064#endif
1228d62bc4baSyz147064
122974e20cfeSnh145002#ifndef SDPIB_MODULE
123074e20cfeSnh145002	MODULE(sdpib,drv);
123174e20cfeSnh145002	STUB(sdpib, sdp_create, nomod_zero);
123274e20cfeSnh145002	STUB(sdpib, sdp_bind, nomod_einval);
123374e20cfeSnh145002	STUB(sdpib, sdp_listen, nomod_einval);
123474e20cfeSnh145002	STUB(sdpib, sdp_connect, nomod_einval);
123574e20cfeSnh145002	STUB(sdpib, sdp_recv, nomod_einval);
123674e20cfeSnh145002	STUB(sdpib, sdp_send, nomod_einval);
123774e20cfeSnh145002	STUB(sdpib, sdp_getpeername, nomod_einval);
123874e20cfeSnh145002	STUB(sdpib, sdp_getsockname, nomod_einval);
123974e20cfeSnh145002	STUB(sdpib, sdp_disconnect, nomod_einval);
124074e20cfeSnh145002	STUB(sdpib, sdp_shutdown, nomod_einval);
124174e20cfeSnh145002	STUB(sdpib, sdp_get_opt, nomod_einval);
124274e20cfeSnh145002	STUB(sdpib, sdp_set_opt, nomod_einval);
124374e20cfeSnh145002	STUB(sdpib, sdp_close, nomod_void);
124474e20cfeSnh145002	STUB(sdpib, sdp_polldata, nomod_zero);
124574e20cfeSnh145002	STUB(sdpib, sdp_ioctl, nomod_einval);
124674e20cfeSnh145002	END_MODULE(sdpib);
124774e20cfeSnh145002#endif
124874e20cfeSnh145002
124974e20cfeSnh145002
1250c28749e9Skais/*
1251c28749e9Skais * Stubs for kssl, the kernel SSL proxy
1252c28749e9Skais */
1253c28749e9Skais#ifndef KSSL_MODULE
1254c28749e9Skais	MODULE(kssl,drv);
1255c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_check_proxy, nomod_zero);
125651dd2c77Svk199839	NO_UNLOAD_STUB(kssl, kssl_handle_mblk, nomod_zero);
1257c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_input, nomod_zero);
1258c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_build_record, nomod_zero);
1259c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_hold_ent, nomod_void);
1260c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_release_ent, nomod_void);
1261c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_find_fallback, nomod_zero);
1262c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_init_context, nomod_zero);
1263c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_hold_ctx, nomod_void);
1264c28749e9Skais	NO_UNLOAD_STUB(kssl, kssl_release_ctx, nomod_void);
1265c28749e9Skais	END_MODULE(kssl);
1266c28749e9Skais#endif
1267c28749e9Skais
12687c478bd9Sstevel@tonic-gate! this is just a marker for the area of text that contains stubs
12697c478bd9Sstevel@tonic-gate	.seg ".text"
12707c478bd9Sstevel@tonic-gate	.global stubs_end
12717c478bd9Sstevel@tonic-gatestubs_end:
12727c478bd9Sstevel@tonic-gate	nop
12737c478bd9Sstevel@tonic-gate
12747c478bd9Sstevel@tonic-gate#endif	/* lint */
1275