xref: /illumos-gate/usr/src/uts/intel/ml/modstubs.s (revision 15f90b02)
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
52caf0dcdSrshoaib * Common Development and Distribution License (the "License").
62caf0dcdSrshoaib * 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 */
212caf0dcdSrshoaib
227c478bd9Sstevel@tonic-gate/*
2380e2ca85S * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
2465f20420SRobert Mustacchi * Copyright 2019 Joyent, Inc.
252b948146SAndy Fiddaman * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
26*7d10cd4dSGarrett D'Amore * Copyright 2022 Garrett D'Amore <garrett@damore.org>
277c478bd9Sstevel@tonic-gate */
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h>
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gate#include "assym.h"
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate/*
347c478bd9Sstevel@tonic-gate * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
357c478bd9Sstevel@tonic-gate *
367c478bd9Sstevel@tonic-gate *	For functions which are either STUBs or WSTUBs the actual function
377c478bd9Sstevel@tonic-gate *	need to be called using 'call' instruction because of preamble and
387c478bd9Sstevel@tonic-gate *	postamble (i.e mod_hold_stub and mod_release_stub) around the
397c478bd9Sstevel@tonic-gate *	function call. Due to this we need to copy arguments for the
407c478bd9Sstevel@tonic-gate *	real function. On Intel we can't tell how many arguments are there
417c478bd9Sstevel@tonic-gate *	on the stack so we have to either copy everything between esp and
427c478bd9Sstevel@tonic-gate *	ebp or copy only a fixed number (MAXNARG - defined here) for
437c478bd9Sstevel@tonic-gate *	all the stub functions. Currently we are using MAXNARG (it is a kludge
447c478bd9Sstevel@tonic-gate *	but worth it?!).
457c478bd9Sstevel@tonic-gate *
467c478bd9Sstevel@tonic-gate *	NOTE: Use NO_UNLOAD_STUBs if the module is NOT unloadable once it is
477c478bd9Sstevel@tonic-gate *	      loaded.
487c478bd9Sstevel@tonic-gate */
497c478bd9Sstevel@tonic-gate#define	MAXNARG	10
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gate/*
527c478bd9Sstevel@tonic-gate * WARNING: there is no check for forgetting to write END_MODULE,
537c478bd9Sstevel@tonic-gate * and if you do, the kernel will most likely crash.  Be careful
547c478bd9Sstevel@tonic-gate *
557c478bd9Sstevel@tonic-gate * This file assumes that all of the contributions to the data segment
567c478bd9Sstevel@tonic-gate * will be contiguous in the output file, even though they are separated
577c478bd9Sstevel@tonic-gate * by pieces of text.  This is safe for all assemblers I know of now...
587c478bd9Sstevel@tonic-gate */
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gate/*
617c478bd9Sstevel@tonic-gate * This file uses ansi preprocessor features:
627c478bd9Sstevel@tonic-gate *
6365f20420SRobert Mustacchi * 1.   #define mac(a) extra_ ## a     -->   mac(x) expands to extra_a
647c478bd9Sstevel@tonic-gate * The old version of this is
657c478bd9Sstevel@tonic-gate *      #define mac(a) extra_/.*.*./a
667c478bd9Sstevel@tonic-gate * but this fails if the argument has spaces "mac ( x )"
677c478bd9Sstevel@tonic-gate * (Ignore the dots above, I had to put them in to keep this a comment.)
687c478bd9Sstevel@tonic-gate *
697c478bd9Sstevel@tonic-gate * 2.   #define mac(a) #a             -->    mac(x) expands to "x"
707c478bd9Sstevel@tonic-gate * The old version is
717c478bd9Sstevel@tonic-gate *      #define mac(a) "a"
727c478bd9Sstevel@tonic-gate *
737c478bd9Sstevel@tonic-gate * For some reason, the 5.0 preprocessor isn't happy with the above usage.
747c478bd9Sstevel@tonic-gate * For now, we're not using these ansi features.
757c478bd9Sstevel@tonic-gate *
767c478bd9Sstevel@tonic-gate * The reason is that "the 5.0 ANSI preprocessor" is built into the compiler
777c478bd9Sstevel@tonic-gate * and is a tokenizing preprocessor. This means, when confronted by something
787c478bd9Sstevel@tonic-gate * other than C token generation rules, strange things occur. In this case,
797c478bd9Sstevel@tonic-gate * when confronted by an assembly file, it would turn the token ".globl" into
807c478bd9Sstevel@tonic-gate * two tokens "." and "globl". For this reason, the traditional, non-ANSI
817c478bd9Sstevel@tonic-gate * preprocessor is used on assembly files.
827c478bd9Sstevel@tonic-gate *
837c478bd9Sstevel@tonic-gate * It would be desirable to have a non-tokenizing cpp (accp?) to use for this.
847c478bd9Sstevel@tonic-gate */
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate/*
877c478bd9Sstevel@tonic-gate * This file contains the stubs routines for modules which can be autoloaded.
887c478bd9Sstevel@tonic-gate */
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate/*
917c478bd9Sstevel@tonic-gate * See the 'struct mod_modinfo' definition to see what this declaration
927c478bd9Sstevel@tonic-gate * is trying to achieve here.
937c478bd9Sstevel@tonic-gate */
947c478bd9Sstevel@tonic-gate#define	MODULE(module,namespace)	\
957c478bd9Sstevel@tonic-gate	.data;				\
967c478bd9Sstevel@tonic-gatemodule/**/_modname:			\
977c478bd9Sstevel@tonic-gate	.string	"namespace/module";	\
987c478bd9Sstevel@tonic-gate	SET_SIZE(module/**/_modname);	\
997c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
1007c478bd9Sstevel@tonic-gate	.globl	module/**/_modinfo;	\
1017c478bd9Sstevel@tonic-gate	.type	module/**/_modinfo, @object;	\
1027c478bd9Sstevel@tonic-gatemodule/**/_modinfo:			\
1037c478bd9Sstevel@tonic-gate	.quad	module/**/_modname;	\
1047c478bd9Sstevel@tonic-gate	.quad	0	/* storage for modctl pointer */
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate	/* then mod_stub_info structures follow until a mods_func_adr is 0 */
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate/* this puts a 0 where the next mods_func_adr would be */
1097c478bd9Sstevel@tonic-gate#define	END_MODULE(module)		\
1107c478bd9Sstevel@tonic-gate	.data;				\
1117c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
1127c478bd9Sstevel@tonic-gate	.quad 0;			\
1137c478bd9Sstevel@tonic-gate	SET_SIZE(module/**/_modinfo)
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gate/*
1167c478bd9Sstevel@tonic-gate * The data section in the stub_common macro is the
1177c478bd9Sstevel@tonic-gate * mod_stub_info structure for the stub function
1187c478bd9Sstevel@tonic-gate */
1197c478bd9Sstevel@tonic-gate
1207c478bd9Sstevel@tonic-gate#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak)		\
1217c478bd9Sstevel@tonic-gate	ENTRY(fcnname);							\
1227c478bd9Sstevel@tonic-gate	leaq	fcnname/**/_info(%rip), %rax;				\
1237c478bd9Sstevel@tonic-gate	cmpl	$0, MODS_FLAG(%rax);			/* weak? */	\
1247c478bd9Sstevel@tonic-gate	je	stubs_common_code;			/* not weak */	\
1257c478bd9Sstevel@tonic-gate	testb	$MODS_INSTALLED, MODS_FLAG(%rax);	/* installed? */ \
1267c478bd9Sstevel@tonic-gate	jne	stubs_common_code;		/* yes, do the mod_hold */ \
12765f20420SRobert Mustacchi	movq	MODS_RETFCN(%rax), %rax;	/* no, load retfcn */	\
12865f20420SRobert Mustacchi	INDIRECT_JMP_REG(rax);			/* no, jump to retfcn */ \
1297c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
1307c478bd9Sstevel@tonic-gate	.data;								\
1317c478bd9Sstevel@tonic-gate	.align	 CPTRSIZE;						\
1327c478bd9Sstevel@tonic-gate	.type	fcnname/**/_info, @object;				\
1337c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
1347c478bd9Sstevel@tonic-gate	.quad	install_fcn;		/* 0 */				\
1357c478bd9Sstevel@tonic-gate	.quad	module/**/_modinfo;	/* 0x8 */			\
1367c478bd9Sstevel@tonic-gate	.quad	fcnname;		/* 0x10 */			\
1377c478bd9Sstevel@tonic-gate	.quad	retfcn;			/* 0x18 */			\
1387c478bd9Sstevel@tonic-gate	.long	weak;			/* 0x20 */			\
1397c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname/**/_info)
1407c478bd9Sstevel@tonic-gate
14149714e86SBryan Cantrill#define STUB_NO_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
1427c478bd9Sstevel@tonic-gate	ENTRY(fcnname);							\
1437c478bd9Sstevel@tonic-gate	leaq	fcnname/**/_info(%rip), %rax;				\
1447c478bd9Sstevel@tonic-gate	testb	$MODS_INSTALLED, MODS_FLAG(%rax); /* installed? */	\
1457c478bd9Sstevel@tonic-gate	je	5f;			/* no */			\
14665f20420SRobert Mustacchi	movq	MODS_INSTFCN(%rax), %rax; /* yes, load install_fcn */	\
14765f20420SRobert Mustacchi	INDIRECT_JMP_REG(rax);		/* yes, jump to install_fcn */	\
1487c478bd9Sstevel@tonic-gate5:	testb	$MODS_WEAK, MODS_FLAG(%rax);	/* weak? */		\
1497c478bd9Sstevel@tonic-gate	je	stubs_common_code;	/* no, do mod load */		\
15065f20420SRobert Mustacchi	movq	MODS_RETFCN(%rax), %rax; /* yes, load retfcn */		\
15165f20420SRobert Mustacchi	INDIRECT_JMP_REG(rax);		/* yes, jump to retfcn */	\
1527c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
1537c478bd9Sstevel@tonic-gate	.data;								\
1547c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;						\
1557c478bd9Sstevel@tonic-gate	.type	fcnname/**/_info, @object;				\
1567c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
1577c478bd9Sstevel@tonic-gate	.quad	install_fcn;		/* 0 */				\
1587c478bd9Sstevel@tonic-gate	.quad	module/**/_modinfo;	/* 0x8 */			\
1597c478bd9Sstevel@tonic-gate	.quad	fcnname;		/* 0x10 */			\
1607c478bd9Sstevel@tonic-gate	.quad	retfcn;			/* 0x18 */			\
1617c478bd9Sstevel@tonic-gate	.long   weak;			/* 0x20 */			\
1627c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname/**/_info)
1637c478bd9Sstevel@tonic-gate
1647c478bd9Sstevel@tonic-gate/*
1657c478bd9Sstevel@tonic-gate * We branch here with the fcnname_info pointer in %rax
1667c478bd9Sstevel@tonic-gate */
1677c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_common_code)
1687c478bd9Sstevel@tonic-gate	.globl	mod_hold_stub
1697c478bd9Sstevel@tonic-gate	.globl	mod_release_stub
1707c478bd9Sstevel@tonic-gate	pushq	%rbp
1717c478bd9Sstevel@tonic-gate	movq	%rsp, %rbp
1727c478bd9Sstevel@tonic-gate	subq	$0x10, %rsp
1737c478bd9Sstevel@tonic-gate	movq	%r15, (%rsp)		/* (caller saved) */
1747c478bd9Sstevel@tonic-gate	movq	%rax, %r15		/* stash the fcnname_info pointer */
1757c478bd9Sstevel@tonic-gate	/*
1767c478bd9Sstevel@tonic-gate	 * save incoming register arguments
1777c478bd9Sstevel@tonic-gate	 */
1787c478bd9Sstevel@tonic-gate	pushq	%rdi
1797c478bd9Sstevel@tonic-gate	pushq	%rsi
1807c478bd9Sstevel@tonic-gate	pushq	%rdx
1817c478bd9Sstevel@tonic-gate	pushq	%rcx
1827c478bd9Sstevel@tonic-gate	pushq	%r8
1837c478bd9Sstevel@tonic-gate	pushq	%r9
1847c478bd9Sstevel@tonic-gate	/* (next 4 args, if any, are already on the stack above %rbp) */
1857c478bd9Sstevel@tonic-gate	movq	%r15, %rdi
1867c478bd9Sstevel@tonic-gate	call	mod_hold_stub		/* mod_hold_stub(mod_stub_info *) */
1877c478bd9Sstevel@tonic-gate	cmpl	$-1, %eax		/* error? */
1887c478bd9Sstevel@tonic-gate	jne	.L1
1897c478bd9Sstevel@tonic-gate	movq	0x18(%r15), %rax
19065f20420SRobert Mustacchi	INDIRECT_CALL_REG(rax)
1917c478bd9Sstevel@tonic-gate	addq	$0x30, %rsp
1927c478bd9Sstevel@tonic-gate	jmp	.L2
1937c478bd9Sstevel@tonic-gate.L1:
1947c478bd9Sstevel@tonic-gate	/*
1957c478bd9Sstevel@tonic-gate	 * copy MAXNARG == 10 incoming arguments
1967c478bd9Sstevel@tonic-gate	 */
1977c478bd9Sstevel@tonic-gate	popq	%r9
1987c478bd9Sstevel@tonic-gate	popq	%r8
1997c478bd9Sstevel@tonic-gate	popq	%rcx
2007c478bd9Sstevel@tonic-gate	popq	%rdx
2017c478bd9Sstevel@tonic-gate	popq	%rsi
2027c478bd9Sstevel@tonic-gate	popq	%rdi
2037c478bd9Sstevel@tonic-gate	/*
2047c478bd9Sstevel@tonic-gate	 * stack:
2057c478bd9Sstevel@tonic-gate	 *	arg9		0x38(%rsp)
2067c478bd9Sstevel@tonic-gate	 *	arg8		0x30(%rsp)
2077c478bd9Sstevel@tonic-gate	 *	arg7		0x28(%rsp)
2087c478bd9Sstevel@tonic-gate	 *	arg6		0x20(%rsp)
2097c478bd9Sstevel@tonic-gate	 *	saved %rip	0x18(%rsp)
2107c478bd9Sstevel@tonic-gate	 *	saved %rbp	0x10(%rsp)
2117c478bd9Sstevel@tonic-gate	 *	<pad>		0x8(%rsp)
2127c478bd9Sstevel@tonic-gate	 *	saved %r15	0x0(%rsp)
2137c478bd9Sstevel@tonic-gate	 */
2147c478bd9Sstevel@tonic-gate	movl	$MAXNARG - 6 + 3, %r11d
2157c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2167c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2177c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2187c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
21965f20420SRobert Mustacchi	movq	(%r15), %rax
22065f20420SRobert Mustacchi	INDIRECT_CALL_REG(rax)		/* call the stub fn(arg, ..) */
2217c478bd9Sstevel@tonic-gate	addq	$0x20, %rsp		/* pop off last 4 args */
2227c478bd9Sstevel@tonic-gate	pushq	%rax			/* save any return values */
2237c478bd9Sstevel@tonic-gate	pushq	%rdx
2247c478bd9Sstevel@tonic-gate	movq	%r15, %rdi
2257c478bd9Sstevel@tonic-gate	call	mod_release_stub	/* release hold on module */
2267c478bd9Sstevel@tonic-gate	popq	%rdx			/* restore return values */
2277c478bd9Sstevel@tonic-gate	popq	%rax
2287c478bd9Sstevel@tonic-gate.L2:
2297c478bd9Sstevel@tonic-gate	popq	%r15
2307c478bd9Sstevel@tonic-gate	leave
2317c478bd9Sstevel@tonic-gate	ret
2327c478bd9Sstevel@tonic-gate	SET_SIZE(stubs_common_code)
2337c478bd9Sstevel@tonic-gate
2347c478bd9Sstevel@tonic-gate#define STUB(module, fcnname, retfcn)	\
2357c478bd9Sstevel@tonic-gate    STUB_COMMON(module, fcnname, mod_hold_stub, retfcn, 0)
2367c478bd9Sstevel@tonic-gate
2377c478bd9Sstevel@tonic-gate/*
2387c478bd9Sstevel@tonic-gate * "weak stub", don't load on account of this call
2397c478bd9Sstevel@tonic-gate */
2407c478bd9Sstevel@tonic-gate#define WSTUB(module, fcnname, retfcn)	\
2417c478bd9Sstevel@tonic-gate    STUB_COMMON(module, fcnname, retfcn, retfcn, MODS_WEAK)
2427c478bd9Sstevel@tonic-gate
2437c478bd9Sstevel@tonic-gate/*
2447c478bd9Sstevel@tonic-gate * "non-unloadable stub", don't bother 'holding' module if it's already loaded
2457c478bd9Sstevel@tonic-gate * since the module cannot be unloaded.
2467c478bd9Sstevel@tonic-gate *
2477c478bd9Sstevel@tonic-gate * User *MUST* guarantee the module is not unloadable (no _fini routine).
2487c478bd9Sstevel@tonic-gate */
2497c478bd9Sstevel@tonic-gate#define NO_UNLOAD_STUB(module, fcnname, retfcn) \
25049714e86SBryan Cantrill    STUB_NO_UNLOADABLE(module, fcnname,  retfcn, retfcn, MODS_NOUNLOAD)
2517c478bd9Sstevel@tonic-gate
2527c478bd9Sstevel@tonic-gate/*
2537c478bd9Sstevel@tonic-gate * "weak stub" for non-unloadable module, don't load on account of this call
2547c478bd9Sstevel@tonic-gate */
2557c478bd9Sstevel@tonic-gate#define NO_UNLOAD_WSTUB(module, fcnname, retfcn) \
25649714e86SBryan Cantrill    STUB_NO_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD|MODS_WEAK)
2577c478bd9Sstevel@tonic-gate
2587c478bd9Sstevel@tonic-gate/*
2597c478bd9Sstevel@tonic-gate * this is just a marker for the beginning area of text that contains stubs
2607c478bd9Sstevel@tonic-gate */
2617c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_base)
2627c478bd9Sstevel@tonic-gate	nop
2637c478bd9Sstevel@tonic-gate
2647c478bd9Sstevel@tonic-gate/*
2657c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING!!!!!!
26665f20420SRobert Mustacchi *
2677c478bd9Sstevel@tonic-gate * On the MODULE macro you MUST NOT use any spaces!!! They are
2687c478bd9Sstevel@tonic-gate * significant to the preprocessor.  With ansi c there is a way around this
2697c478bd9Sstevel@tonic-gate * but for some reason (yet to be investigated) ansi didn't work for other
27065f20420SRobert Mustacchi * reasons!
2717c478bd9Sstevel@tonic-gate *
2727c478bd9Sstevel@tonic-gate * When zero is used as the return function, the system will call
2737c478bd9Sstevel@tonic-gate * panic if the stub can't be resolved.
2747c478bd9Sstevel@tonic-gate */
2757c478bd9Sstevel@tonic-gate
2767c478bd9Sstevel@tonic-gate/*
2777c478bd9Sstevel@tonic-gate * Stubs for devfs. A non-unloadable module.
2787c478bd9Sstevel@tonic-gate */
2797c478bd9Sstevel@tonic-gate
2807c478bd9Sstevel@tonic-gate#ifndef	DEVFS_MODULE
2817c478bd9Sstevel@tonic-gate	MODULE(devfs,fs);
2827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_clean,		nomod_minus_one);
2837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_lookupname,		nomod_minus_one);
2847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_walk,		nomod_minus_one);
2857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_devpolicy,		nomod_minus_one);
2867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_reset_perm,		nomod_minus_one);
2877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_remdrv_cleanup,	nomod_minus_one);
2887c478bd9Sstevel@tonic-gate	END_MODULE(devfs);
2897c478bd9Sstevel@tonic-gate#endif
2907c478bd9Sstevel@tonic-gate
291facf4a8dSllai#ifndef	DEV_MODULE
292facf4a8dSllai	MODULE(dev,fs);
293facf4a8dSllai	NO_UNLOAD_STUB(dev, sdev_modctl_readdir,	nomod_minus_one);
294facf4a8dSllai	NO_UNLOAD_STUB(dev, sdev_modctl_readdir_free,	nomod_minus_one);
295facf4a8dSllai	NO_UNLOAD_STUB(dev, devname_filename_register,	nomod_minus_one);
296facf4a8dSllai	NO_UNLOAD_STUB(dev, sdev_modctl_devexists,	nomod_minus_one);
297facf4a8dSllai	NO_UNLOAD_STUB(dev, devname_profile_update,	nomod_minus_one);
298facf4a8dSllai	NO_UNLOAD_STUB(dev, sdev_devstate_change,	nomod_minus_one);
299aecfc01dSrui zang - Sun Microsystems - Beijing China	NO_UNLOAD_STUB(dev, devvt_getvnodeops,		nomod_minus_one);
300facf4a8dSllai	NO_UNLOAD_STUB(dev, devpts_getvnodeops,		nomod_zero);
301facf4a8dSllai	END_MODULE(dev);
302facf4a8dSllai#endif
303facf4a8dSllai
3047c478bd9Sstevel@tonic-gate/*
3057c478bd9Sstevel@tonic-gate * Stubs for specfs. A non-unloadable module.
3067c478bd9Sstevel@tonic-gate */
3077c478bd9Sstevel@tonic-gate
3087c478bd9Sstevel@tonic-gate#ifndef SPEC_MODULE
3097c478bd9Sstevel@tonic-gate	MODULE(specfs,fs);
3107c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, common_specvp,		nomod_zero);
3117c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, makectty,		nomod_zero);
31265f20420SRobert Mustacchi	NO_UNLOAD_STUB(specfs, makespecvp,		nomod_zero);
31365f20420SRobert Mustacchi	NO_UNLOAD_STUB(specfs, smark,			nomod_zero);
31465f20420SRobert Mustacchi	NO_UNLOAD_STUB(specfs, spec_segmap,		nomod_einval);
31565f20420SRobert Mustacchi	NO_UNLOAD_STUB(specfs, specfind,		nomod_zero);
31665f20420SRobert Mustacchi	NO_UNLOAD_STUB(specfs, specvp,			nomod_zero);
3177c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, devi_stillreferenced,	nomod_zero);
3187c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_getvnodeops,	nomod_zero);
3197c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_char_map,		nomod_zero);
32065f20420SRobert Mustacchi	NO_UNLOAD_STUB(specfs, specvp_devfs,		nomod_zero);
3217c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_assoc_vp_with_devi,	nomod_void);
3227c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_hold_devi_by_vp,	nomod_zero);
3237c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_snode_walk,		nomod_void);
3247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_devi_open_count,	nomod_minus_one);
3257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_is_clone,		nomod_zero);
3267c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_is_selfclone,	nomod_zero);
32725e8c5aaSvikram	NO_UNLOAD_STUB(specfs, spec_fence_snode,	nomod_minus_one);
32825e8c5aaSvikram	NO_UNLOAD_STUB(specfs, spec_unfence_snode,	nomod_minus_one);
3297c478bd9Sstevel@tonic-gate	END_MODULE(specfs);
3307c478bd9Sstevel@tonic-gate#endif
3317c478bd9Sstevel@tonic-gate
3327c478bd9Sstevel@tonic-gate
3337c478bd9Sstevel@tonic-gate/*
3347c478bd9Sstevel@tonic-gate * Stubs for sockfs. A non-unloadable module.
3357c478bd9Sstevel@tonic-gate */
3367c478bd9Sstevel@tonic-gate#ifndef SOCK_MODULE
3377c478bd9Sstevel@tonic-gate	MODULE(sockfs,fs);
33865f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, so_socket,	nomod_zero);
3397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, so_socketpair,	nomod_zero);
34065f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, bind,		nomod_zero);
34165f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, listen,		nomod_zero);
34265f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, accept,		nomod_zero);
34365f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, connect,		nomod_zero);
34465f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, shutdown,	nomod_zero);
34565f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, recv,		nomod_zero);
34665f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, recvfrom,	nomod_zero);
34765f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, recvmsg,		nomod_zero);
34865f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, send,		nomod_zero);
34965f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sendmsg,		nomod_zero);
35065f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sendto,		nomod_zero);
3517c478bd9Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL
3527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recv32,		nomod_zero);
3537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recvfrom32,	nomod_zero);
3547c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, send32,		nomod_zero);
3557c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sendto32,	nomod_zero);
3567c478bd9Sstevel@tonic-gate#endif	/* _SYSCALL32_IMPL */
35765f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, getpeername,	nomod_zero);
35865f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, getsockname,	nomod_zero);
35965f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, getsockopt,	nomod_zero);
36065f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, setsockopt,	nomod_zero);
36165f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sockconfig,	nomod_zero);
36265f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sock_getmsg,	nomod_zero);
36365f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sock_putmsg,	nomod_zero);
36465f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sosendfile64,	nomod_zero);
36565f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, snf_segmap,	nomod_einval);
36665f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sock_getfasync,	nomod_zero);
36765f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, sotpi_sototpi,	nomod_zero);
36865f20420SRobert Mustacchi	NO_UNLOAD_STUB(sockfs, socket_sendmblk,	nomod_zero);
3690f1702c5SYu Xiangning	NO_UNLOAD_STUB(sockfs, socket_setsockopt,  nomod_zero);
3707c478bd9Sstevel@tonic-gate	END_MODULE(sockfs);
3717c478bd9Sstevel@tonic-gate#endif
3727c478bd9Sstevel@tonic-gate
3737c478bd9Sstevel@tonic-gate/*
3747c478bd9Sstevel@tonic-gate * IPsec stubs.
3757c478bd9Sstevel@tonic-gate */
3767c478bd9Sstevel@tonic-gate
3777c478bd9Sstevel@tonic-gate#ifndef	IPSECAH_MODULE
3787c478bd9Sstevel@tonic-gate	MODULE(ipsecah,drv);
3797c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsec_construct_inverse_acquire,	nomod_zero);
3807c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_acquire,		nomod_zero);
3817c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_algs_changed,	nomod_zero);
3827c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_alg_update,	nomod_zero);
3837c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_unlinkassoc,	nomod_zero);
3847c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_insertassoc,	nomod_zero);
3857c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_in_assocfailure,	nomod_zero);
3867c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_set_lpkt,		nomod_zero);
3877c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_icmp_error,	nomod_zero);
3887c478bd9Sstevel@tonic-gate	END_MODULE(ipsecah);
3897c478bd9Sstevel@tonic-gate#endif
390f8cbe0e7SDan McDonald
3917c478bd9Sstevel@tonic-gate#ifndef	IPSECESP_MODULE
3927c478bd9Sstevel@tonic-gate	MODULE(ipsecesp,drv);
3937c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_fill_defs,	nomod_zero);
3947c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_algs_changed,	nomod_zero);
3957c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp, ipsecesp_in_assocfailure,	nomod_zero);
3967c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp, ipsecesp_init_funcs,	nomod_zero);
3977c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_icmp_error,	nomod_zero);
398437220cdSdanmcd	WSTUB(ipsecesp,	ipsecesp_send_keepalive,	nomod_zero);
3997c478bd9Sstevel@tonic-gate	END_MODULE(ipsecesp);
4007c478bd9Sstevel@tonic-gate#endif
401f8cbe0e7SDan McDonald
4027c478bd9Sstevel@tonic-gate#ifndef	KEYSOCK_MODULE
4037c478bd9Sstevel@tonic-gate	MODULE(keysock,	drv);
404f8cbe0e7SDan McDonald	WSTUB(keysock,	keysock_spdsock_wput_iocdata,	nomod_void);
4057c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_plumb_ipsec,	nomod_zero);
4067c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_extended_reg,	nomod_zero);
4077c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_next_seq,	nomod_zero);
4087c478bd9Sstevel@tonic-gate	END_MODULE(keysock);
4097c478bd9Sstevel@tonic-gate#endif
4107c478bd9Sstevel@tonic-gate
4117c478bd9Sstevel@tonic-gate#ifndef SPDSOCK_MODULE
4127c478bd9Sstevel@tonic-gate	MODULE(spdsock,drv);
4137c478bd9Sstevel@tonic-gate	WSTUB(spdsock,	spdsock_update_pending_algs,	nomod_zero);
4147c478bd9Sstevel@tonic-gate	END_MODULE(spdsock);
4157c478bd9Sstevel@tonic-gate#endif
4167c478bd9Sstevel@tonic-gate
4177c478bd9Sstevel@tonic-gate/*
4187c478bd9Sstevel@tonic-gate * Stubs for nfs common code.
4197c478bd9Sstevel@tonic-gate * XXX nfs_getvnodeops should go away with removal of kludge in vnode.c
4207c478bd9Sstevel@tonic-gate */
4217c478bd9Sstevel@tonic-gate#ifndef NFS_MODULE
4227c478bd9Sstevel@tonic-gate	MODULE(nfs,fs);
4237c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_getvnodeops,	nomod_zero);
4247c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_perror,		nomod_zero);
4257c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_cmn_err,		nomod_zero);
4267c478bd9Sstevel@tonic-gate	WSTUB(nfs,	clcleanup_zone,		nomod_zero);
4277c478bd9Sstevel@tonic-gate	WSTUB(nfs,	clcleanup4_zone,	nomod_zero);
4287c478bd9Sstevel@tonic-gate	END_MODULE(nfs);
4297c478bd9Sstevel@tonic-gate#endif
4307c478bd9Sstevel@tonic-gate
4317c478bd9Sstevel@tonic-gate
4327c478bd9Sstevel@tonic-gate/*
4337c478bd9Sstevel@tonic-gate * Stubs for nfs_dlboot (diskless booting).
4347c478bd9Sstevel@tonic-gate */
4357c478bd9Sstevel@tonic-gate#ifndef NFS_DLBOOT_MODULE
4367c478bd9Sstevel@tonic-gate	MODULE(nfs_dlboot,misc);
4377c478bd9Sstevel@tonic-gate	STUB(nfs_dlboot,	mount_root,	nomod_minus_one);
4387c478bd9Sstevel@tonic-gate	STUB(nfs_dlboot,	dhcpinit,	nomod_minus_one);
4397c478bd9Sstevel@tonic-gate	END_MODULE(nfs_dlboot);
4407c478bd9Sstevel@tonic-gate#endif
4417c478bd9Sstevel@tonic-gate
4427c478bd9Sstevel@tonic-gate/*
4437c478bd9Sstevel@tonic-gate * Stubs for nfs server-only code.
4447c478bd9Sstevel@tonic-gate */
4457c478bd9Sstevel@tonic-gate#ifndef NFSSRV_MODULE
4467c478bd9Sstevel@tonic-gate	MODULE(nfssrv,misc);
4477c478bd9Sstevel@tonic-gate	STUB(nfssrv,		exportfs,	nomod_minus_one);
4487c478bd9Sstevel@tonic-gate	STUB(nfssrv,		nfs_getfh,	nomod_minus_one);
4497c478bd9Sstevel@tonic-gate	STUB(nfssrv,		nfsl_flush,	nomod_minus_one);
4501cc55349Srmesta	STUB(nfssrv,		rfs4_check_delegated, nomod_zero);
4511cc55349Srmesta	STUB(nfssrv,		mountd_args,	nomod_minus_one);
4527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(nfssrv,	rdma_start,	nomod_zero);
4537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(nfssrv,	nfs_svc,	nomod_zero);
4547c478bd9Sstevel@tonic-gate	END_MODULE(nfssrv);
4557c478bd9Sstevel@tonic-gate#endif
4567c478bd9Sstevel@tonic-gate
4577c478bd9Sstevel@tonic-gate/*
4587c478bd9Sstevel@tonic-gate * Stubs for kernel lock manager.
4597c478bd9Sstevel@tonic-gate */
4607c478bd9Sstevel@tonic-gate#ifndef KLM_MODULE
4617c478bd9Sstevel@tonic-gate	MODULE(klmmod,misc);
4627c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_svc,		nomod_zero);
4637c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_shutdown,	nomod_zero);
4647c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_unexport,	nomod_zero);
4652df1fe9cSrandyf	NO_UNLOAD_STUB(klmmod, lm_cprresume,	nomod_zero);
46665f20420SRobert Mustacchi	NO_UNLOAD_STUB(klmmod, lm_cprsuspend,	nomod_zero);
4677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_safelock, nomod_zero);
4687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_safemap, nomod_zero);
4697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_has_sleep, nomod_zero);
4707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_free_config, nomod_zero);
4717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_vp_active, nomod_zero);
4727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_get_sysid, nomod_zero);
4737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_rel_sysid, nomod_zero);
47465f20420SRobert Mustacchi	NO_UNLOAD_STUB(klmmod, lm_alloc_sysidt, nomod_minus_one);
47565f20420SRobert Mustacchi	NO_UNLOAD_STUB(klmmod, lm_free_sysidt, nomod_zero);
4767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_sysidt, nomod_minus_one);
4777c478bd9Sstevel@tonic-gate	END_MODULE(klmmod);
4787c478bd9Sstevel@tonic-gate#endif
4797c478bd9Sstevel@tonic-gate
4807c478bd9Sstevel@tonic-gate#ifndef KLMOPS_MODULE
4817c478bd9Sstevel@tonic-gate	MODULE(klmops,misc);
4827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_frlock,	nomod_zero);
4837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm4_frlock,	nomod_zero);
4847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_shrlock,	nomod_zero);
4857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm4_shrlock,	nomod_zero);
4867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm_dispatch,	nomod_zero);
4877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm4_dispatch,	nomod_zero);
4887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm_reclaim,	nomod_zero);
4897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm4_reclaim,	nomod_zero);
4907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero);
4917c478bd9Sstevel@tonic-gate	END_MODULE(klmops);
4927c478bd9Sstevel@tonic-gate#endif
4937c478bd9Sstevel@tonic-gate
4947c478bd9Sstevel@tonic-gate/*
4957c478bd9Sstevel@tonic-gate * Stubs for kernel TLI module
4967c478bd9Sstevel@tonic-gate *   XXX currently we never allow this to unload
4977c478bd9Sstevel@tonic-gate */
4987c478bd9Sstevel@tonic-gate#ifndef TLI_MODULE
4997c478bd9Sstevel@tonic-gate	MODULE(tlimod,misc);
5007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kopen,		nomod_minus_one);
5017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kunbind,		nomod_zero);
5027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kadvise,		nomod_zero);
5037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_krcvudata,		nomod_zero);
5047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_ksndudata,		nomod_zero);
5057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kalloc,		nomod_zero);
5067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kbind,		nomod_zero);
5077c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kclose,		nomod_zero);
5087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kspoll,		nomod_zero);
5097c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kfree,		nomod_zero);
510fdfb62c8SGordon Ross	NO_UNLOAD_STUB(tlimod,	t_koptmgmt,		nomod_zero);
5117c478bd9Sstevel@tonic-gate	END_MODULE(tlimod);
5127c478bd9Sstevel@tonic-gate#endif
5137c478bd9Sstevel@tonic-gate
5147c478bd9Sstevel@tonic-gate/*
5157c478bd9Sstevel@tonic-gate * Stubs for kernel RPC module
5167c478bd9Sstevel@tonic-gate *   XXX currently we never allow this to unload
5177c478bd9Sstevel@tonic-gate */
5187c478bd9Sstevel@tonic-gate#ifndef RPC_MODULE
5197c478bd9Sstevel@tonic-gate	MODULE(rpcmod,strmod);
5207c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod,	clnt_tli_kcreate,	nomod_minus_one);
5217c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod,	svc_tli_kcreate,	nomod_minus_one);
5227c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod,	bindresvport,		nomod_minus_one);
5237c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, rdma_register_mod,	nomod_minus_one);
5247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod,	nomod_minus_one);
5257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, svc_queuereq,		nomod_minus_one);
5267c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, clist_add,		nomod_minus_one);
5277c478bd9Sstevel@tonic-gate	END_MODULE(rpcmod);
5287c478bd9Sstevel@tonic-gate#endif
5297c478bd9Sstevel@tonic-gate
5307c478bd9Sstevel@tonic-gate/*
5317c478bd9Sstevel@tonic-gate * Stubs for des
5327c478bd9Sstevel@tonic-gate */
5337c478bd9Sstevel@tonic-gate#ifndef DES_MODULE
5347c478bd9Sstevel@tonic-gate	MODULE(des,misc);
53565f20420SRobert Mustacchi	STUB(des, cbc_crypt,		nomod_zero);
53665f20420SRobert Mustacchi	STUB(des, ecb_crypt,		nomod_zero);
5377c478bd9Sstevel@tonic-gate	STUB(des, _des_crypt,		nomod_zero);
5387c478bd9Sstevel@tonic-gate	END_MODULE(des);
5397c478bd9Sstevel@tonic-gate#endif
5407c478bd9Sstevel@tonic-gate
5417c478bd9Sstevel@tonic-gate/*
5427c478bd9Sstevel@tonic-gate * Stubs for procfs. A non-unloadable module.
5437c478bd9Sstevel@tonic-gate */
5447c478bd9Sstevel@tonic-gate#ifndef PROC_MODULE
5457c478bd9Sstevel@tonic-gate	MODULE(procfs,fs);
5467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prfree,		nomod_zero);
5477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexit,		nomod_zero);
5487c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prlwpfree,	nomod_zero);
5497c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prlwpexit,	nomod_zero);
5507c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prinvalidate,	nomod_zero);
5517c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prnsegs,		nomod_zero);
5527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetcred,	nomod_zero);
5537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpriv,	nomod_zero);
5547c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetprivsize,	nomod_zero);
55565f20420SRobert Mustacchi	NO_UNLOAD_STUB(procfs, prgetsecflags,	nomod_zero);
5567c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetstatus,	nomod_zero);
5577c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpstatus,	nomod_zero);
5587c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpsinfo,	nomod_zero);
5597c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpsinfo,	nomod_zero);
5607c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetstatus,	nomod_zero);
5617c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetpsinfo,	nomod_zero);
5627c478bd9Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL
5637c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetstatus32,	nomod_zero);
5647c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpstatus32, nomod_zero);
5657c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpsinfo32,	nomod_zero);
5667c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpsinfo32,	nomod_zero);
5677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetstatus32,	nomod_zero);
5687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetpsinfo32,	nomod_zero);
569f971a346SBryan Cantrill	NO_UNLOAD_STUB(procfs, psinfo_kto32,	nomod_zero);
570f971a346SBryan Cantrill	NO_UNLOAD_STUB(procfs, lwpsinfo_kto32,	nomod_zero);
5717c478bd9Sstevel@tonic-gate#endif	/* _SYSCALL32_IMPL */
5727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prnotify,	nomod_zero);
5737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexecstart,	nomod_zero);
5747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexecend,	nomod_zero);
5757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prrelvm,		nomod_zero);
5767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prbarrier,	nomod_zero);
5777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, estimate_msacct,	nomod_zero);
5787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getprot,	nomod_zero);
5797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getprot_done,	nomod_zero);
5807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getsegsize,	nomod_zero);
5817c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_isobject,	nomod_zero);
5827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_isself,	nomod_zero);
5837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_allstopped,	nomod_zero);
5847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_free_watched_pages, nomod_zero);
5857c478bd9Sstevel@tonic-gate	END_MODULE(procfs);
5867c478bd9Sstevel@tonic-gate#endif
5877c478bd9Sstevel@tonic-gate
5887c478bd9Sstevel@tonic-gate/*
5897c478bd9Sstevel@tonic-gate * Stubs for fifofs
5907c478bd9Sstevel@tonic-gate */
5917c478bd9Sstevel@tonic-gate#ifndef FIFO_MODULE
5927c478bd9Sstevel@tonic-gate	MODULE(fifofs,fs);
59365f20420SRobert Mustacchi	NO_UNLOAD_STUB(fifofs, fifovp,		nomod_zero);
59449714e86SBryan Cantrill	NO_UNLOAD_STUB(fifofs, fifo_getinfo,	nomod_zero);
59549714e86SBryan Cantrill	NO_UNLOAD_STUB(fifofs, fifo_vfastoff,	nomod_zero);
5967c478bd9Sstevel@tonic-gate	END_MODULE(fifofs);
5977c478bd9Sstevel@tonic-gate#endif
5987c478bd9Sstevel@tonic-gate
5997c478bd9Sstevel@tonic-gate/*
6007c478bd9Sstevel@tonic-gate * Stubs for ufs
6017c478bd9Sstevel@tonic-gate *
6027c478bd9Sstevel@tonic-gate * This is needed to support the old quotactl system call.
6037c478bd9Sstevel@tonic-gate * When the old sysent stuff goes away, this will need to be revisited.
6047c478bd9Sstevel@tonic-gate */
6057c478bd9Sstevel@tonic-gate#ifndef UFS_MODULE
6067c478bd9Sstevel@tonic-gate	MODULE(ufs,fs);
6077c478bd9Sstevel@tonic-gate	STUB(ufs, quotactl, nomod_minus_one);
6087c478bd9Sstevel@tonic-gate	END_MODULE(ufs);
6097c478bd9Sstevel@tonic-gate#endif
6107c478bd9Sstevel@tonic-gate
611e7cbe64fSgw/*
612e7cbe64fSgw * Stubs for zfs
613e7cbe64fSgw */
614e7cbe64fSgw#ifndef ZFS_MODULE
615e7cbe64fSgw	MODULE(zfs,fs);
6168034149bSRic Aleshire	STUB(zfs, dsl_prop_get, nomod_minus_one);
617e7cbe64fSgw	STUB(zfs, spa_boot_init, nomod_minus_one);
6188034149bSRic Aleshire	STUB(zfs, zfs_prop_to_name, nomod_zero);
619e7cbe64fSgw	END_MODULE(zfs);
620e7cbe64fSgw#endif
621e7cbe64fSgw
622986fd29aSsetje/*
623986fd29aSsetje * Stubs for dcfs
624986fd29aSsetje */
625986fd29aSsetje#ifndef DCFS_MODULE
626986fd29aSsetje	MODULE(dcfs,fs);
627986fd29aSsetje	STUB(dcfs, decompvp, 0);
628986fd29aSsetje	END_MODULE(dcfs);
629986fd29aSsetje#endif
630986fd29aSsetje
6317c478bd9Sstevel@tonic-gate/*
6327c478bd9Sstevel@tonic-gate * Stubs for namefs
6337c478bd9Sstevel@tonic-gate */
6347c478bd9Sstevel@tonic-gate#ifndef NAMEFS_MODULE
6357c478bd9Sstevel@tonic-gate	MODULE(namefs,fs);
63665f20420SRobert Mustacchi	STUB(namefs, nm_unmountall,	0);
6377c478bd9Sstevel@tonic-gate	END_MODULE(namefs);
6387c478bd9Sstevel@tonic-gate#endif
6397c478bd9Sstevel@tonic-gate
64035a5a358SJonathan Adams/*
64135a5a358SJonathan Adams * Stubs for sysdc
64235a5a358SJonathan Adams */
64335a5a358SJonathan Adams#ifndef SDC_MODULE
64435a5a358SJonathan Adams	MODULE(SDC,sched);
64535a5a358SJonathan Adams	NO_UNLOAD_STUB(SDC, sysdc_thread_enter,		nomod_zero);
64635a5a358SJonathan Adams	END_MODULE(SDC);
64735a5a358SJonathan Adams#endif
64835a5a358SJonathan Adams
6497c478bd9Sstevel@tonic-gate/*
6507c478bd9Sstevel@tonic-gate * Stubs for ts_dptbl
6517c478bd9Sstevel@tonic-gate */
6527c478bd9Sstevel@tonic-gate#ifndef TS_DPTBL_MODULE
6537c478bd9Sstevel@tonic-gate	MODULE(TS_DPTBL,sched);
6547c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getdptbl,		0);
6557c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getkmdpris,		0);
6567c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getmaxumdpri,	0);
6577c478bd9Sstevel@tonic-gate	END_MODULE(TS_DPTBL);
6587c478bd9Sstevel@tonic-gate#endif
6597c478bd9Sstevel@tonic-gate
6607c478bd9Sstevel@tonic-gate/*
6617c478bd9Sstevel@tonic-gate * Stubs for rt_dptbl
6627c478bd9Sstevel@tonic-gate */
6637c478bd9Sstevel@tonic-gate#ifndef RT_DPTBL_MODULE
6647c478bd9Sstevel@tonic-gate	MODULE(RT_DPTBL,sched);
6657c478bd9Sstevel@tonic-gate	STUB(RT_DPTBL, rt_getdptbl,		0);
6667c478bd9Sstevel@tonic-gate	END_MODULE(RT_DPTBL);
6677c478bd9Sstevel@tonic-gate#endif
6687c478bd9Sstevel@tonic-gate
6697c478bd9Sstevel@tonic-gate/*
6707c478bd9Sstevel@tonic-gate * Stubs for ia_dptbl
6717c478bd9Sstevel@tonic-gate */
6727c478bd9Sstevel@tonic-gate#ifndef IA_DPTBL_MODULE
6737c478bd9Sstevel@tonic-gate	MODULE(IA_DPTBL,sched);
6747c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getdptbl,		nomod_zero);
6757c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getkmdpris,		nomod_zero);
6767c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getmaxumdpri,	nomod_zero);
6777c478bd9Sstevel@tonic-gate	END_MODULE(IA_DPTBL);
6787c478bd9Sstevel@tonic-gate#endif
6797c478bd9Sstevel@tonic-gate
6807c478bd9Sstevel@tonic-gate/*
6817c478bd9Sstevel@tonic-gate * Stubs for FSS scheduler
6827c478bd9Sstevel@tonic-gate */
6837c478bd9Sstevel@tonic-gate#ifndef FSS_MODULE
6847c478bd9Sstevel@tonic-gate	MODULE(FSS,sched);
6857c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_allocbuf,		nomod_zero);
6867c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_freebuf,			nomod_zero);
6877c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_changeproj,		nomod_zero);
6887c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_changepset,		nomod_zero);
6897c478bd9Sstevel@tonic-gate	END_MODULE(FSS);
6907c478bd9Sstevel@tonic-gate#endif
6917c478bd9Sstevel@tonic-gate
6927c478bd9Sstevel@tonic-gate/*
6937c478bd9Sstevel@tonic-gate * Stubs for fx_dptbl
6947c478bd9Sstevel@tonic-gate */
6957c478bd9Sstevel@tonic-gate#ifndef FX_DPTBL_MODULE
6967c478bd9Sstevel@tonic-gate	MODULE(FX_DPTBL,sched);
6977c478bd9Sstevel@tonic-gate	STUB(FX_DPTBL, fx_getdptbl,		0);
6987c478bd9Sstevel@tonic-gate	STUB(FX_DPTBL, fx_getmaxumdpri,		0);
6997c478bd9Sstevel@tonic-gate	END_MODULE(FX_DPTBL);
7007c478bd9Sstevel@tonic-gate#endif
7017c478bd9Sstevel@tonic-gate
7027c478bd9Sstevel@tonic-gate/*
7037c478bd9Sstevel@tonic-gate * Stubs for bootdev
7047c478bd9Sstevel@tonic-gate */
7057c478bd9Sstevel@tonic-gate#ifndef BOOTDEV_MODULE
7067c478bd9Sstevel@tonic-gate	MODULE(bootdev,misc);
7077c478bd9Sstevel@tonic-gate	STUB(bootdev, i_promname_to_devname, 0);
7087c478bd9Sstevel@tonic-gate	STUB(bootdev, i_convert_boot_device_name, 0);
7097c478bd9Sstevel@tonic-gate	END_MODULE(bootdev);
7107c478bd9Sstevel@tonic-gate#endif
7117c478bd9Sstevel@tonic-gate
7127c478bd9Sstevel@tonic-gate/*
7137c478bd9Sstevel@tonic-gate * stubs for strplumb...
7147c478bd9Sstevel@tonic-gate */
7157c478bd9Sstevel@tonic-gate#ifndef STRPLUMB_MODULE
7167c478bd9Sstevel@tonic-gate	MODULE(strplumb,misc);
7177c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb,     0);
7187c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb_load, 0);
7197c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb_get_netdev_path, 0);
7207c478bd9Sstevel@tonic-gate	END_MODULE(strplumb);
7217c478bd9Sstevel@tonic-gate#endif
7227c478bd9Sstevel@tonic-gate
7237c478bd9Sstevel@tonic-gate/*
7247c478bd9Sstevel@tonic-gate * Stubs for console configuration module
7257c478bd9Sstevel@tonic-gate */
7267c478bd9Sstevel@tonic-gate#ifndef CONSCONFIG_MODULE
7277c478bd9Sstevel@tonic-gate	MODULE(consconfig,misc);
7287c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig,	0);
7297c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig_get_usb_kb_path,	0);
7307c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig_get_usb_ms_path,	0);
73148633f18SJan Setje-Eilers	STUB(consconfig, consconfig_get_plat_fbpath,	0);
73240482326SVincent Wang	STUB(consconfig, consconfig_console_is_ready,	0);
7337c478bd9Sstevel@tonic-gate	END_MODULE(consconfig);
7347c478bd9Sstevel@tonic-gate#endif
7357c478bd9Sstevel@tonic-gate
73665f20420SRobert Mustacchi/*
7377c478bd9Sstevel@tonic-gate * Stubs for accounting.
7387c478bd9Sstevel@tonic-gate */
7397c478bd9Sstevel@tonic-gate#ifndef SYSACCT_MODULE
7407c478bd9Sstevel@tonic-gate	MODULE(sysacct,sys);
74165f20420SRobert Mustacchi	NO_UNLOAD_WSTUB(sysacct, acct,			nomod_zero);
74265f20420SRobert Mustacchi	NO_UNLOAD_WSTUB(sysacct, acct_fs_in_use,	nomod_zero);
7437c478bd9Sstevel@tonic-gate	END_MODULE(sysacct);
7447c478bd9Sstevel@tonic-gate#endif
7457c478bd9Sstevel@tonic-gate
7467c478bd9Sstevel@tonic-gate/*
7477c478bd9Sstevel@tonic-gate * Stubs for semaphore routines. sem.c
7487c478bd9Sstevel@tonic-gate */
7497c478bd9Sstevel@tonic-gate#ifndef SEMSYS_MODULE
7507c478bd9Sstevel@tonic-gate	MODULE(semsys,sys);
75149714e86SBryan Cantrill	NO_UNLOAD_WSTUB(semsys, semexit,		nomod_zero);
7527c478bd9Sstevel@tonic-gate	END_MODULE(semsys);
7537c478bd9Sstevel@tonic-gate#endif
7547c478bd9Sstevel@tonic-gate
7557c478bd9Sstevel@tonic-gate/*
7567c478bd9Sstevel@tonic-gate * Stubs for shmem routines. shm.c
7577c478bd9Sstevel@tonic-gate */
7587c478bd9Sstevel@tonic-gate#ifndef SHMSYS_MODULE
7597c478bd9Sstevel@tonic-gate	MODULE(shmsys,sys);
76049714e86SBryan Cantrill	NO_UNLOAD_WSTUB(shmsys, shmexit,		nomod_zero);
76149714e86SBryan Cantrill	NO_UNLOAD_WSTUB(shmsys, shmfork,		nomod_zero);
76249714e86SBryan Cantrill	NO_UNLOAD_WSTUB(shmsys, shmgetid,		nomod_minus_one);
7637c478bd9Sstevel@tonic-gate	END_MODULE(shmsys);
7647c478bd9Sstevel@tonic-gate#endif
7657c478bd9Sstevel@tonic-gate
7667c478bd9Sstevel@tonic-gate/*
7677c478bd9Sstevel@tonic-gate * Stubs for doors
7687c478bd9Sstevel@tonic-gate */
7697c478bd9Sstevel@tonic-gate#ifndef DOOR_MODULE
7707c478bd9Sstevel@tonic-gate	MODULE(doorfs,sys);
77149714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_slam,		nomod_zero);
77249714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_exit,		nomod_zero);
77349714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_revoke_all,	nomod_zero);
77449714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_fork,		nomod_zero);
7757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_upcall,		nomod_einval);
7767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_create,		nomod_einval);
7777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_open,		nomod_einval);
7787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_lookup,		nomod_zero);
77949714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_ki_upcall,		nomod_einval);
78049714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_ki_upcall_limited,	nomod_einval);
78149714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_ki_hold,		nomod_zero);
78249714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_ki_rele,		nomod_zero);
78349714e86SBryan Cantrill	NO_UNLOAD_WSTUB(doorfs, door_ki_info,		nomod_einval);
7847c478bd9Sstevel@tonic-gate	END_MODULE(doorfs);
7857c478bd9Sstevel@tonic-gate#endif
7867c478bd9Sstevel@tonic-gate
787753a6d45SSherry Moore/*
788753a6d45SSherry Moore * Stubs for MD5
789753a6d45SSherry Moore */
790753a6d45SSherry Moore#ifndef MD5_MODULE
791753a6d45SSherry Moore	MODULE(md5,misc);
792753a6d45SSherry Moore	WSTUB(md5, MD5Init,		nomod_zero);
793753a6d45SSherry Moore	WSTUB(md5, MD5Update,		nomod_zero);
794753a6d45SSherry Moore	WSTUB(md5, MD5Final,		nomod_zero);
795753a6d45SSherry Moore	END_MODULE(md5);
796753a6d45SSherry Moore#endif
797753a6d45SSherry Moore
798c5c4113dSnw/*
799c5c4113dSnw * Stubs for idmap
800c5c4113dSnw */
801c5c4113dSnw#ifndef IDMAP_MODULE
802c5c4113dSnw	MODULE(idmap,misc);
803bda89588Sjp	STUB(idmap, kidmap_batch_getgidbysid,	nomod_zero);
804bda89588Sjp	STUB(idmap, kidmap_batch_getpidbysid,	nomod_zero);
805bda89588Sjp	STUB(idmap, kidmap_batch_getsidbygid,	nomod_zero);
806bda89588Sjp	STUB(idmap, kidmap_batch_getsidbyuid,	nomod_zero);
807bda89588Sjp	STUB(idmap, kidmap_batch_getuidbysid,	nomod_zero);
808bda89588Sjp	STUB(idmap, kidmap_get_create,		nomod_zero);
809bda89588Sjp	STUB(idmap, kidmap_get_destroy,		nomod_zero);
810bda89588Sjp	STUB(idmap, kidmap_get_mappings,	nomod_zero);
811bda89588Sjp	STUB(idmap, kidmap_getgidbysid,		nomod_zero);
812bda89588Sjp	STUB(idmap, kidmap_getpidbysid,		nomod_zero);
813bda89588Sjp	STUB(idmap, kidmap_getsidbygid,		nomod_zero);
814bda89588Sjp	STUB(idmap, kidmap_getsidbyuid,		nomod_zero);
815bda89588Sjp	STUB(idmap, kidmap_getuidbysid,		nomod_zero);
816bda89588Sjp	STUB(idmap, idmap_get_door,		nomod_einval);
817bda89588Sjp	STUB(idmap, idmap_unreg_dh,		nomod_einval);
818bda89588Sjp	STUB(idmap, idmap_reg_dh,		nomod_einval);
819bda89588Sjp	STUB(idmap, idmap_purge_cache,		nomod_einval);
820c5c4113dSnw	END_MODULE(idmap);
821c5c4113dSnw#endif
822c5c4113dSnw
8237c478bd9Sstevel@tonic-gate/*
8247c478bd9Sstevel@tonic-gate * Stubs for auditing.
8257c478bd9Sstevel@tonic-gate */
8267c478bd9Sstevel@tonic-gate#ifndef C2AUDIT_MODULE
8277c478bd9Sstevel@tonic-gate	MODULE(c2audit,sys);
828005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, audit_init_module,	nomod_zero);
82965f20420SRobert Mustacchi	NO_UNLOAD_STUB(c2audit, audit_start,		nomod_zero);
8307c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_finish,		nomod_zero);
831005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, audit,			nomod_zero);
832005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, auditdoor,		nomod_zero);
8337c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_closef,		nomod_zero);
8347c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_core_start,	nomod_zero);
8357c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_core_finish,	nomod_zero);
8367c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strputmsg,	nomod_zero);
8377c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_savepath,		nomod_zero);
8387c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_anchorpath,	nomod_zero);
8397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exit,		nomod_zero);
8407c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exec,		nomod_zero);
8417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_symlink,		nomod_zero);
8427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_symlink_create,	nomod_zero);
8437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_vncreate_start,	nomod_zero);
8447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_vncreate_finish,	nomod_zero);
8457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_enterprom,	nomod_zero);
8467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exitprom,		nomod_zero);
8477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_chdirec,		nomod_zero);
8487c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setf,		nomod_zero);
8497c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_sock,		nomod_zero);
8507c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strgetmsg,	nomod_zero);
8517c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_ipc,		nomod_zero);
8527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_ipcget,		nomod_zero);
8537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_fdsend,		nomod_zero);
8547c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_fdrecv,		nomod_zero);
8557c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_priv,		nomod_zero);
8567c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setppriv,		nomod_zero);
857d2a70789SRichard Lowe	NO_UNLOAD_STUB(c2audit, audit_psecflags,	nomod_zero);
8587c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_devpolicy,	nomod_zero);
8597c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setfsat_path,	nomod_zero);
8607c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_cryptoadm,	nomod_zero);
861799bd290Spwernau	NO_UNLOAD_STUB(c2audit, audit_pf_policy,	nomod_zero);
862005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_doormsg,		nomod_zero);
863005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_uwrite,		nomod_zero);
864005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_to_arg32,		nomod_zero);
865005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_free_rec,		nomod_zero);
8667c478bd9Sstevel@tonic-gate	END_MODULE(c2audit);
8677c478bd9Sstevel@tonic-gate#endif
8687c478bd9Sstevel@tonic-gate
8697c478bd9Sstevel@tonic-gate/*
8707c478bd9Sstevel@tonic-gate * Stubs for kernel rpc security service module
8717c478bd9Sstevel@tonic-gate */
8727c478bd9Sstevel@tonic-gate#ifndef RPCSEC_MODULE
8737c478bd9Sstevel@tonic-gate	MODULE(rpcsec,misc);
8747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_clnt_revoke,		nomod_zero);
8757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, authkern_create,		nomod_zero);
8767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_svc_msg,		nomod_zero);
8777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_svc_control,		nomod_zero);
8787c478bd9Sstevel@tonic-gate	END_MODULE(rpcsec);
8797c478bd9Sstevel@tonic-gate#endif
88065f20420SRobert Mustacchi
8817c478bd9Sstevel@tonic-gate/*
8827c478bd9Sstevel@tonic-gate * Stubs for rpc RPCSEC_GSS security service module
8837c478bd9Sstevel@tonic-gate */
8847c478bd9Sstevel@tonic-gate#ifndef RPCSEC_GSS_MODULE
8857c478bd9Sstevel@tonic-gate	MODULE(rpcsec_gss,misc);
8867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, __svcrpcsec_gss,		nomod_zero);
8877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_getcred,		nomod_zero);
8887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_callback,	nomod_zero);
8897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secget,		nomod_zero);
8907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secfree,		nomod_zero);
8917c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_seccreate,		nomod_zero);
8927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_defaults,	nomod_zero);
8937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_revauth,		nomod_zero);
8947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secpurge,		nomod_zero);
8957c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_cleanup,		nomod_zero);
8967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_versions,	nomod_zero);
8977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_max_data_length,	nomod_zero);
8987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_svc_max_data_length,	nomod_zero);
8990a701b1eSRobert Gordon	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_service_type,	nomod_zero);
9007c478bd9Sstevel@tonic-gate	END_MODULE(rpcsec_gss);
9017c478bd9Sstevel@tonic-gate#endif
9027c478bd9Sstevel@tonic-gate
9037c478bd9Sstevel@tonic-gate/*
9047c478bd9Sstevel@tonic-gate * Stubs for PCI configurator module (misc/pcicfg).
9057c478bd9Sstevel@tonic-gate */
9067c478bd9Sstevel@tonic-gate#ifndef PCICFG_MODULE
9077c478bd9Sstevel@tonic-gate	MODULE(pcicfg,misc);
9087c478bd9Sstevel@tonic-gate	STUB(pcicfg, pcicfg_configure, 0);
9097c478bd9Sstevel@tonic-gate	STUB(pcicfg, pcicfg_unconfigure, 0);
9107c478bd9Sstevel@tonic-gate	END_MODULE(pcicfg);
9117c478bd9Sstevel@tonic-gate#endif
9127c478bd9Sstevel@tonic-gate
91370025d76Sjohnny/*
91426947304SEvan Yan * Stubs for pcieb nexus driver.
91570025d76Sjohnny */
91626947304SEvan Yan#ifndef PCIEB_MODULE
91726947304SEvan Yan	MODULE(pcieb,drv);
91826947304SEvan Yan	STUB(pcieb, pcieb_intel_error_workaround, 0);
91926947304SEvan Yan	END_MODULE(pcieb);
92070025d76Sjohnny#endif
92170025d76Sjohnny
9227c478bd9Sstevel@tonic-gate#ifndef IWSCN_MODULE
9237c478bd9Sstevel@tonic-gate	MODULE(iwscn,drv);
9247c478bd9Sstevel@tonic-gate	STUB(iwscn, srpop, 0);
9257c478bd9Sstevel@tonic-gate	END_MODULE(iwscn);
9267c478bd9Sstevel@tonic-gate#endif
9277c478bd9Sstevel@tonic-gate
9287c478bd9Sstevel@tonic-gate/*
9297c478bd9Sstevel@tonic-gate * Stubs for checkpoint-resume module
9307c478bd9Sstevel@tonic-gate */
9317c478bd9Sstevel@tonic-gate#ifndef CPR_MODULE
9327c478bd9Sstevel@tonic-gate        MODULE(cpr,misc);
9337c478bd9Sstevel@tonic-gate        STUB(cpr, cpr, 0);
9347c478bd9Sstevel@tonic-gate        END_MODULE(cpr);
9357c478bd9Sstevel@tonic-gate#endif
9367c478bd9Sstevel@tonic-gate
9377c478bd9Sstevel@tonic-gate/*
9387c478bd9Sstevel@tonic-gate * Stubs for kernel probes (tnf module).  Not unloadable.
9397c478bd9Sstevel@tonic-gate */
9407c478bd9Sstevel@tonic-gate#ifndef TNF_MODULE
9417c478bd9Sstevel@tonic-gate	MODULE(tnf,drv);
9427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_ref32_1,	nomod_zero);
9437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_string_1,	nomod_zero);
9447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_opaque_array_1,	nomod_zero);
9457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_struct_tag_1,	nomod_zero);
9467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_allocate,	nomod_zero);
9477c478bd9Sstevel@tonic-gate	END_MODULE(tnf);
9487c478bd9Sstevel@tonic-gate#endif
9497c478bd9Sstevel@tonic-gate
95006bbe1e0Sedp/*
95106bbe1e0Sedp * Stubs for i86hvm bootstraping
95206bbe1e0Sedp */
95306bbe1e0Sedp#ifndef HVM_BOOTSTRAP
95406bbe1e0Sedp	MODULE(hvm_bootstrap,misc);
95506bbe1e0Sedp	NO_UNLOAD_STUB(hvm_bootstrap, hvmboot_rootconf, nomod_zero);
95606bbe1e0Sedp	END_MODULE(hvm_bootstrap);
95706bbe1e0Sedp#endif
95806bbe1e0Sedp
9597c478bd9Sstevel@tonic-gate/*
9607c478bd9Sstevel@tonic-gate * Clustering: stubs for bootstrapping.
9617c478bd9Sstevel@tonic-gate */
9627c478bd9Sstevel@tonic-gate#ifndef CL_BOOTSTRAP
9637c478bd9Sstevel@tonic-gate	MODULE(cl_bootstrap,misc);
9647c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_modload, nomod_minus_one);
9657c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_loadrootmodules, nomod_zero);
9667c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_rootconf, nomod_zero);
9677c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_mountroot, nomod_zero);
9687c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_init, nomod_zero);
9697c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_get_nodeid, nomod_zero);
9707c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_maximum_nodeid, nomod_zero);
9717c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, cluster, nomod_zero);
9727c478bd9Sstevel@tonic-gate	END_MODULE(cl_bootstrap);
9737c478bd9Sstevel@tonic-gate#endif
9747c478bd9Sstevel@tonic-gate
9757c478bd9Sstevel@tonic-gate/*
9767c478bd9Sstevel@tonic-gate * Clustering: stubs for cluster infrastructure.
97765f20420SRobert Mustacchi */
9787c478bd9Sstevel@tonic-gate#ifndef CL_COMM_MODULE
9797c478bd9Sstevel@tonic-gate	MODULE(cl_comm,misc);
9807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(cl_comm, cladmin, nomod_minus_one);
9817c478bd9Sstevel@tonic-gate	END_MODULE(cl_comm);
9827c478bd9Sstevel@tonic-gate#endif
9837c478bd9Sstevel@tonic-gate
9847c478bd9Sstevel@tonic-gate/*
9857c478bd9Sstevel@tonic-gate * Clustering: stubs for global file system operations.
9867c478bd9Sstevel@tonic-gate */
9877c478bd9Sstevel@tonic-gate#ifndef PXFS_MODULE
9887c478bd9Sstevel@tonic-gate	MODULE(pxfs,fs);
9897c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_read, nomod_zero);
9907c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_write, nomod_zero);
9917c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, cl_flk_state_transition_notify, nomod_zero);
9927c478bd9Sstevel@tonic-gate	END_MODULE(pxfs);
9937c478bd9Sstevel@tonic-gate#endif
9947c478bd9Sstevel@tonic-gate
9957c478bd9Sstevel@tonic-gate/*
9967c478bd9Sstevel@tonic-gate * Stubs for kernel cryptographic framework module (misc/kcf).
9977c478bd9Sstevel@tonic-gate */
9987c478bd9Sstevel@tonic-gate#ifndef KCF_MODULE
9997c478bd9Sstevel@tonic-gate	MODULE(kcf,misc);
10007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mech2id, nomod_minus_one);
10017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_register_provider, nomod_minus_one);
10027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unregister_provider, nomod_minus_one);
10037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_provider_notification, nomod_minus_one);
10047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_op_notification, nomod_minus_one);
10057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_kmflag, nomod_minus_one);
10067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest, nomod_minus_one);
1007894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_prov, nomod_minus_one);
10087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_init, nomod_minus_one);
1009894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_init_prov, nomod_minus_one);
10107c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_update, nomod_minus_one);
10117c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_final, nomod_minus_one);
1012894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_key_prov, nomod_minus_one);
10137c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt, nomod_minus_one);
1014894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_prov, nomod_minus_one);
10157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_init, nomod_minus_one);
1016894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_init_prov, nomod_minus_one);
10177c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_update, nomod_minus_one);
10187c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_final, nomod_minus_one);
10197c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt, nomod_minus_one);
1020894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_decrypt_prov, nomod_minus_one);
10217c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_init, nomod_minus_one);
1022894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_decrypt_init_prov, nomod_minus_one);
10237c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_update, nomod_minus_one);
10247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_final, nomod_minus_one);
10257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_get_all_mech_info, nomod_minus_one);
1026894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_check, nomod_minus_one);
1027894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_check_prov, nomod_minus_one);
1028894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_derive, nomod_minus_one);
1029894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_generate, nomod_minus_one);
1030894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_generate_pair, nomod_minus_one);
1031894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_unwrap, nomod_minus_one);
1032894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_wrap, nomod_minus_one);
10337c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac, nomod_minus_one);
1034894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_prov, nomod_minus_one);
10357c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_verify, nomod_minus_one);
1036894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_verify_prov, nomod_minus_one);
10377c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_init, nomod_minus_one);
1038894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_init_prov, nomod_minus_one);
10397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_update, nomod_minus_one);
10407c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_final, nomod_minus_one);
10417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt, nomod_minus_one);
1042894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_prov, nomod_minus_one);
10437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt, nomod_minus_one);
1044894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt_prov, nomod_minus_one);
10457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init, nomod_minus_one);
1046894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init_prov, nomod_minus_one);
10477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_update, nomod_minus_one);
10487c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_final, nomod_minus_one);
1049894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_copy, nomod_minus_one);
1050894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_create, nomod_minus_one);
1051894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_destroy, nomod_minus_one);
1052894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find_final, nomod_minus_one);
1053894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find_init, nomod_minus_one);
1054894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find, nomod_minus_one);
1055894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_get_attribute_value, nomod_minus_one);
1056894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_get_size, nomod_minus_one);
1057894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_set_attribute_value, nomod_minus_one);
1058894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_close, nomod_minus_one);
1059894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_login, nomod_minus_one);
1060894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_logout, nomod_minus_one);
1061894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_open, nomod_minus_one);
10627c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac, nomod_minus_one);
1063894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_prov, nomod_minus_one);
10647c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init, nomod_minus_one);
1065894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init_prov, nomod_minus_one);
10667c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_update, nomod_minus_one);
10677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_final, nomod_minus_one);
10687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_create_ctx_template, nomod_minus_one);
10697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_destroy_ctx_template, nomod_minus_one);
10707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_get_mech_list, nomod_minus_one);
10717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_free_mech_list, nomod_minus_one);
10727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_cancel_req, nomod_minus_one);
10737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_cancel_ctx, nomod_minus_one);
10747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall_alloc, nomod_minus_one);
10757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall_free, nomod_minus_one);
10767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall, nomod_minus_one);
10777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unbufcall, nomod_minus_one);
10787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_notify_events, nomod_minus_one);
10797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unnotify_events, nomod_minus_one);
1080894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_get_provider, nomod_minus_one);
1081c892ebf1Skrishna	NO_UNLOAD_STUB(kcf, crypto_get_provinfo, nomod_minus_one);
1082894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_release_provider, nomod_minus_one);
10837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign, nomod_minus_one);
1084894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_prov, nomod_minus_one);
10857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_init, nomod_minus_one);
1086894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_init_prov, nomod_minus_one);
10877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_update, nomod_minus_one);
10887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_final, nomod_minus_one);
10897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_recover, nomod_minus_one);
1090894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_recover_prov, nomod_minus_one);
1091894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_recover_init_prov, nomod_minus_one);
10927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify, nomod_minus_one);
1093894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_prov, nomod_minus_one);
10947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_init, nomod_minus_one);
1095894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_init_prov, nomod_minus_one);
10967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_update, nomod_minus_one);
10977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_final, nomod_minus_one);
10987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_recover, nomod_minus_one);
1099894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_recover_prov, nomod_minus_one);
1100894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_recover_init_prov, nomod_minus_one);
11017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_add_entropy, nomod_minus_one);
11023364c169SVladimir Kotal	NO_UNLOAD_STUB(kcf, random_add_pseudo_entropy, nomod_minus_one);
11039d12795fSRobert Mustacchi	NO_UNLOAD_STUB(kcf, random_get_blocking_bytes, nomod_minus_one);
11047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_get_bytes, nomod_minus_one);
11057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_get_pseudo_bytes, nomod_minus_one);
11067c478bd9Sstevel@tonic-gate	END_MODULE(kcf);
11077c478bd9Sstevel@tonic-gate#endif
11087c478bd9Sstevel@tonic-gate
11097c478bd9Sstevel@tonic-gate/*
11107c478bd9Sstevel@tonic-gate * Stubs for sha1. A non-unloadable module.
11117c478bd9Sstevel@tonic-gate */
11127c478bd9Sstevel@tonic-gate#ifndef SHA1_MODULE
11137c478bd9Sstevel@tonic-gate	MODULE(sha1,crypto);
11147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Init, nomod_void);
11157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Update, nomod_void);
11167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Final, nomod_void);
11177c478bd9Sstevel@tonic-gate	END_MODULE(sha1);
11187c478bd9Sstevel@tonic-gate#endif
11197c478bd9Sstevel@tonic-gate
1120210db224Sericheng/*
1121210db224Sericheng * The following stubs are used by the mac module.
1122d62bc4baSyz * Since dld already depends on mac, these
1123210db224Sericheng * stubs are needed to avoid circular dependencies.
1124210db224Sericheng */
1125210db224Sericheng#ifndef	DLD_MODULE
11267c478bd9Sstevel@tonic-gate	MODULE(dld,drv);
1127210db224Sericheng	STUB(dld, dld_init_ops, nomod_void);
1128210db224Sericheng	STUB(dld, dld_fini_ops, nomod_void);
112961af1958SGarrett D'Amore	STUB(dld, dld_devt_to_instance, nomod_minus_one);
1130d62bc4baSyz	STUB(dld, dld_autopush, nomod_minus_one);
1131da14cebeSEric Cheng	STUB(dld, dld_ioc_register, nomod_einval);
1132da14cebeSEric Cheng	STUB(dld, dld_ioc_unregister, nomod_void);
11337c478bd9Sstevel@tonic-gate	END_MODULE(dld);
11347c478bd9Sstevel@tonic-gate#endif
11357c478bd9Sstevel@tonic-gate
1136d62bc4baSyz/*
1137d62bc4baSyz * The following stubs are used by the mac module.
1138d62bc4baSyz * Since dls already depends on mac, these
1139d62bc4baSyz * stubs are needed to avoid circular dependencies.
1140d62bc4baSyz */
1141d62bc4baSyz#ifndef DLS_MODULE
1142d62bc4baSyz	MODULE(dls,misc);
1143d62bc4baSyz	STUB(dls, dls_devnet_mac, nomod_zero);
1144d62bc4baSyz	STUB(dls, dls_devnet_hold_tmp, nomod_einval);
1145d62bc4baSyz	STUB(dls, dls_devnet_rele_tmp, nomod_void);
1146da14cebeSEric Cheng	STUB(dls, dls_devnet_hold_link, nomod_einval);
1147da14cebeSEric Cheng	STUB(dls, dls_devnet_rele_link, nomod_void);
114830890389Sartem	STUB(dls, dls_devnet_prop_task_wait, nomod_void);
1149d62bc4baSyz	STUB(dls, dls_mgmt_get_linkid, nomod_einval);
1150da14cebeSEric Cheng	STUB(dls, dls_devnet_macname2linkid, nomod_einval);
1151da14cebeSEric Cheng	STUB(dls, dls_mgmt_get_linkinfo, nomod_einval);
1152d62bc4baSyz        END_MODULE(dls);
1153d62bc4baSyz#endif
1154d62bc4baSyz
1155d62bc4baSyz#ifndef	SOFTMAC_MODULE
1156d62bc4baSyz	MODULE(softmac,drv);
1157d62bc4baSyz	STUB(softmac, softmac_hold_device, nomod_einval);
1158d62bc4baSyz	STUB(softmac, softmac_rele_device, nomod_void);
1159d62bc4baSyz	STUB(softmac, softmac_recreate, nomod_void);
1160d62bc4baSyz	END_MODULE(softmac);
1161d62bc4baSyz#endif
1162d62bc4baSyz
11632b24ab6bSSebastien Roy#ifndef IPTUN_MODULE
11642b24ab6bSSebastien Roy	MODULE(iptun,drv);
11652b24ab6bSSebastien Roy	STUB(iptun, iptun_create, nomod_einval);
11662b24ab6bSSebastien Roy	STUB(iptun, iptun_delete, nomod_einval);
11672b24ab6bSSebastien Roy	STUB(iptun, iptun_set_policy, nomod_void) ;
11682b24ab6bSSebastien Roy	END_MODULE(iptun);
11692b24ab6bSSebastien Roy#endif
11702b24ab6bSSebastien Roy
117117169044Sbrutus/*
117217169044Sbrutus * Stubs for dcopy, for Intel IOAT KAPIs
117317169044Sbrutus */
117417169044Sbrutus#ifndef DCOPY_MODULE
117517169044Sbrutus	MODULE(dcopy,misc);
117617169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_query, nomod_minus_one);
117717169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_query_channel, nomod_minus_one);
117817169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_alloc, nomod_minus_one);
117917169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_free, nomod_minus_one);
118017169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_alloc, nomod_minus_one);
118117169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_free, nomod_void);
118217169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_post, nomod_minus_one);
118317169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_poll, nomod_minus_one);
118417169044Sbrutus	END_MODULE(dcopy);
118517169044Sbrutus#endif
118617169044Sbrutus
11870e751525SEric Saxe/*
11880e751525SEric Saxe * Stubs for acpica
11890e751525SEric Saxe */
11900e751525SEric Saxe#ifndef ACPICA_MODULE
11910e751525SEric Saxe	MODULE(acpica,misc);
11920e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiOsReadPort, nomod_minus_one) ;
11930e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiOsWritePort, nomod_minus_one) ;
11940e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiInstallNotifyHandler, nomod_minus_one) ;
11950e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiRemoveNotifyHandler, nomod_minus_one) ;
11960e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiEvaluateObject, nomod_minus_one) ;
11970e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiEvaluateObjectTyped, nomod_minus_one) ;
1198aa2aa9a6SDana Myers	NO_UNLOAD_STUB(acpica, AcpiWriteBitRegister, nomod_minus_one) ;
1199aa2aa9a6SDana Myers	NO_UNLOAD_STUB(acpica, AcpiReadBitRegister, nomod_minus_one) ;
12000e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiOsFree, nomod_minus_one) ;
12010e751525SEric Saxe	NO_UNLOAD_STUB(acpica, acpica_get_handle_cpu, nomod_minus_one) ;
12020e751525SEric Saxe	NO_UNLOAD_STUB(acpica, acpica_get_global_FADT, nomod_minus_one) ;
120378d5422cSMark Haywood	NO_UNLOAD_STUB(acpica, acpica_write_cpupm_capabilities,
120478d5422cSMark Haywood	    nomod_minus_one)		       ;
12050e751525SEric Saxe	NO_UNLOAD_STUB(acpica, __acpi_wbinvd, nomod_minus_one) ;
12064cf02d40SSaurabh Misra	NO_UNLOAD_STUB(acpica, acpi_reset_system, nomod_minus_one) ;
12070e751525SEric Saxe	END_MODULE(acpica);
12080e751525SEric Saxe#endif
12090e751525SEric Saxe
1210a3114836SGerry Liu/*
1211a3114836SGerry Liu * Stubs for acpidev
1212a3114836SGerry Liu */
1213a3114836SGerry Liu#ifndef ACPIDEV_MODULE
1214a3114836SGerry Liu	MODULE(acpidev,misc);
1215a3114836SGerry Liu	NO_UNLOAD_STUB(acpidev, acpidev_dr_get_cpu_numa_info, nomod_minus_one) ;
1216a3114836SGerry Liu	NO_UNLOAD_STUB(acpidev, acpidev_dr_free_cpu_numa_info,
1217a3114836SGerry Liu	    nomod_minus_one) ;
1218a3114836SGerry Liu	END_MODULE(acpidev);
1219a3114836SGerry Liu#endif
1220a3114836SGerry Liu
1221b127ac41SPhilip Kirk#ifndef IPNET_MODULE
1222b127ac41SPhilip Kirk	MODULE(ipnet,drv);
1223b127ac41SPhilip Kirk	STUB(ipnet, ipnet_if_getdev, nomod_zero);
1224b127ac41SPhilip Kirk	STUB(ipnet, ipnet_walk_if, nomod_zero);
1225b127ac41SPhilip Kirk	END_MODULE(ipnet);
1226b127ac41SPhilip Kirk#endif
1227b127ac41SPhilip Kirk
122809011d40SVikram Hegde#ifndef IOMMULIB_MODULE
122909011d40SVikram Hegde	MODULE(iommulib,misc);
123009011d40SVikram Hegde	STUB(iommulib, iommulib_nex_close, nomod_void);
123109011d40SVikram Hegde        END_MODULE(iommulib);
123209011d40SVikram Hegde#endif
123309011d40SVikram Hegde
12343a634bfcSVikram Hegde/*
12353a634bfcSVikram Hegde * Stubs for rootnex nexus driver.
12363a634bfcSVikram Hegde */
12373a634bfcSVikram Hegde#ifndef ROOTNEX_MODULE
12383a634bfcSVikram Hegde	MODULE(rootnex,drv);
12393a634bfcSVikram Hegde	STUB(rootnex, immu_init, 0);
12403a634bfcSVikram Hegde	STUB(rootnex, immu_startup, 0);
12413a634bfcSVikram Hegde	STUB(rootnex, immu_physmem_update, 0);
12423a634bfcSVikram Hegde	END_MODULE(rootnex);
12433a634bfcSVikram Hegde#endif
12443a634bfcSVikram Hegde
12450f1702c5SYu Xiangning/*
12460f1702c5SYu Xiangning * Stubs for kernel socket, for iscsi
12470f1702c5SYu Xiangning */
12480f1702c5SYu Xiangning#ifndef KSOCKET_MODULE
12490f1702c5SYu Xiangning	MODULE(ksocket, misc);
12500f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_setsockopt, nomod_minus_one);
12510f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_getsockopt, nomod_minus_one);
12520f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_getpeername, nomod_minus_one);
12530f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_getsockname, nomod_minus_one);
12540f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_socket, nomod_minus_one);
12550f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_bind, nomod_minus_one);
12560f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_listen, nomod_minus_one);
12570f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_accept, nomod_minus_one);
12580f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_connect, nomod_minus_one);
12590f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_recv, nomod_minus_one);
12600f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_recvfrom, nomod_minus_one);
12610f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_recvmsg, nomod_minus_one);
12620f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_send, nomod_minus_one);
12630f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_sendto, nomod_minus_one);
12640f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_sendmsg, nomod_minus_one);
12650f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_ioctl, nomod_minus_one);
12660f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_setcallbacks, nomod_minus_one);
12670f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_hold, nomod_minus_one);
12680f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_rele, nomod_minus_one);
12690f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_shutdown, nomod_minus_one);
12700f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_close, nomod_minus_one);
12710f1702c5SYu Xiangning	END_MODULE(ksocket);
12720f1702c5SYu Xiangning#endif
12730f1702c5SYu Xiangning
127480e2ca85S/*
127580e2ca85S * Stubs for elfexec
127680e2ca85S */
127780e2ca85S#ifndef ELFEXEC_MODULE
127880e2ca85S	MODULE(elfexec,exec);
127965f20420SRobert Mustacchi	STUB(elfexec, elfexec,		nomod_einval);
128080e2ca85S	STUB(elfexec, mapexec_brand,	nomod_einval);
128187aac450SGerald Jelinek	STUB(elfexec, elf32exec,	nomod_einval);
128280e2ca85S	STUB(elfexec, mapexec32_brand,	nomod_einval);
128380e2ca85S	END_MODULE(elfexec);
128480e2ca85S#endif
128580e2ca85S
12867ff178cdSJimmy Vetayases/*
12877ff178cdSJimmy Vetayases * Stub(s) for APIX module.
12887ff178cdSJimmy Vetayases */
12897ff178cdSJimmy Vetayases#ifndef APIX_MODULE
12907ff178cdSJimmy Vetayases	MODULE(apix,mach);
12917ff178cdSJimmy Vetayases	WSTUB(apix, apix_loaded, nomod_zero);
12927ff178cdSJimmy Vetayases	END_MODULE(apix);
12937ff178cdSJimmy Vetayases#endif
12947ff178cdSJimmy Vetayases
129565f20420SRobert Mustacchi/*
1296eb9a1df2SHans Rosenfeld * Stubs for ppt module (bhyve PCI passthrough driver)
129765f20420SRobert Mustacchi */
1298eb9a1df2SHans Rosenfeld#ifndef PPT_MODULE
1299eb9a1df2SHans Rosenfeld	MODULE(ppt,drv);
1300eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_unassign_all,		nomod_zero);
1301eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_map_mmio,		nomod_einval);
13022b948146SAndy Fiddaman	WSTUB(ppt, ppt_unmap_mmio,		nomod_einval);
1303eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_setup_msi,		nomod_einval);
1304eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_setup_msix,		nomod_einval);
13056960cd89SAndy Fiddaman	WSTUB(ppt, ppt_disable_msix,		nomod_einval);
1306eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_assigned_devices,	nomod_zero);
1307eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_is_mmio,			nomod_zero);
1308eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_assign_device,		nomod_einval);
1309eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_unassign_device,		nomod_einval);
1310eb9a1df2SHans Rosenfeld	WSTUB(ppt, ppt_get_limits,		nomod_einval);
1311eb9a1df2SHans Rosenfeld	END_MODULE(ppt);
1312eb9a1df2SHans Rosenfeld#endif
13137c478bd9Sstevel@tonic-gate
1314eb9a1df2SHans Rosenfeld/*
1315eb9a1df2SHans Rosenfeld * this is just a marker for the area of text that contains stubs
1316eb9a1df2SHans Rosenfeld */
13177c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_end)
13187c478bd9Sstevel@tonic-gate	nop
13197c478bd9Sstevel@tonic-gate
1320