xref: /titanic_51/usr/src/uts/intel/ia32/ml/modstubs.s (revision 9d12795f87b63c2e39e87bff369182edd34677d3)
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.
24*9d12795fSRobert Mustacchi * Copyright (c) 2015, Joyent, Inc. All rights reserved.
257c478bd9Sstevel@tonic-gate */
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h>
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate#if defined(__lint)
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gatechar stubs_base[1], stubs_end[1];
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate#else	/* __lint */
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gate#include "assym.h"
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gate/*
387c478bd9Sstevel@tonic-gate * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
397c478bd9Sstevel@tonic-gate *
407c478bd9Sstevel@tonic-gate *	For functions which are either STUBs or WSTUBs the actual function
417c478bd9Sstevel@tonic-gate *	need to be called using 'call' instruction because of preamble and
427c478bd9Sstevel@tonic-gate *	postamble (i.e mod_hold_stub and mod_release_stub) around the
437c478bd9Sstevel@tonic-gate *	function call. Due to this we need to copy arguments for the
447c478bd9Sstevel@tonic-gate *	real function. On Intel we can't tell how many arguments are there
457c478bd9Sstevel@tonic-gate *	on the stack so we have to either copy everything between esp and
467c478bd9Sstevel@tonic-gate *	ebp or copy only a fixed number (MAXNARG - defined here) for
477c478bd9Sstevel@tonic-gate *	all the stub functions. Currently we are using MAXNARG (it is a kludge
487c478bd9Sstevel@tonic-gate *	but worth it?!).
497c478bd9Sstevel@tonic-gate *
507c478bd9Sstevel@tonic-gate *	NOTE: Use NO_UNLOAD_STUBs if the module is NOT unloadable once it is
517c478bd9Sstevel@tonic-gate *	      loaded.
527c478bd9Sstevel@tonic-gate */
537c478bd9Sstevel@tonic-gate#define	MAXNARG	10
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gate/*
567c478bd9Sstevel@tonic-gate * WARNING: there is no check for forgetting to write END_MODULE,
577c478bd9Sstevel@tonic-gate * and if you do, the kernel will most likely crash.  Be careful
587c478bd9Sstevel@tonic-gate *
597c478bd9Sstevel@tonic-gate * This file assumes that all of the contributions to the data segment
607c478bd9Sstevel@tonic-gate * will be contiguous in the output file, even though they are separated
617c478bd9Sstevel@tonic-gate * by pieces of text.  This is safe for all assemblers I know of now...
627c478bd9Sstevel@tonic-gate */
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate/*
657c478bd9Sstevel@tonic-gate * This file uses ansi preprocessor features:
667c478bd9Sstevel@tonic-gate *
677c478bd9Sstevel@tonic-gate * 1. 	#define mac(a) extra_ ## a     -->   mac(x) expands to extra_a
687c478bd9Sstevel@tonic-gate * The old version of this is
697c478bd9Sstevel@tonic-gate *      #define mac(a) extra_/.*.*./a
707c478bd9Sstevel@tonic-gate * but this fails if the argument has spaces "mac ( x )"
717c478bd9Sstevel@tonic-gate * (Ignore the dots above, I had to put them in to keep this a comment.)
727c478bd9Sstevel@tonic-gate *
737c478bd9Sstevel@tonic-gate * 2.   #define mac(a) #a             -->    mac(x) expands to "x"
747c478bd9Sstevel@tonic-gate * The old version is
757c478bd9Sstevel@tonic-gate *      #define mac(a) "a"
767c478bd9Sstevel@tonic-gate *
777c478bd9Sstevel@tonic-gate * For some reason, the 5.0 preprocessor isn't happy with the above usage.
787c478bd9Sstevel@tonic-gate * For now, we're not using these ansi features.
797c478bd9Sstevel@tonic-gate *
807c478bd9Sstevel@tonic-gate * The reason is that "the 5.0 ANSI preprocessor" is built into the compiler
817c478bd9Sstevel@tonic-gate * and is a tokenizing preprocessor. This means, when confronted by something
827c478bd9Sstevel@tonic-gate * other than C token generation rules, strange things occur. In this case,
837c478bd9Sstevel@tonic-gate * when confronted by an assembly file, it would turn the token ".globl" into
847c478bd9Sstevel@tonic-gate * two tokens "." and "globl". For this reason, the traditional, non-ANSI
857c478bd9Sstevel@tonic-gate * preprocessor is used on assembly files.
867c478bd9Sstevel@tonic-gate *
877c478bd9Sstevel@tonic-gate * It would be desirable to have a non-tokenizing cpp (accp?) to use for this.
887c478bd9Sstevel@tonic-gate */
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate/*
917c478bd9Sstevel@tonic-gate * This file contains the stubs routines for modules which can be autoloaded.
927c478bd9Sstevel@tonic-gate */
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate#if defined(__amd64)
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate/*
977c478bd9Sstevel@tonic-gate * See the 'struct mod_modinfo' definition to see what this declaration
987c478bd9Sstevel@tonic-gate * is trying to achieve here.
997c478bd9Sstevel@tonic-gate */
1007c478bd9Sstevel@tonic-gate#define	MODULE(module,namespace)	\
1017c478bd9Sstevel@tonic-gate	.data;				\
1027c478bd9Sstevel@tonic-gatemodule/**/_modname:			\
1037c478bd9Sstevel@tonic-gate	.string	"namespace/module";	\
1047c478bd9Sstevel@tonic-gate	SET_SIZE(module/**/_modname);	\
1057c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
1067c478bd9Sstevel@tonic-gate	.globl	module/**/_modinfo;	\
1077c478bd9Sstevel@tonic-gate	.type	module/**/_modinfo, @object;	\
1087c478bd9Sstevel@tonic-gatemodule/**/_modinfo:			\
1097c478bd9Sstevel@tonic-gate	.quad	module/**/_modname;	\
1107c478bd9Sstevel@tonic-gate	.quad	0	/* storage for modctl pointer */
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gate	/* then mod_stub_info structures follow until a mods_func_adr is 0 */
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gate/* this puts a 0 where the next mods_func_adr would be */
1157c478bd9Sstevel@tonic-gate#define	END_MODULE(module)		\
1167c478bd9Sstevel@tonic-gate	.data;				\
1177c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
1187c478bd9Sstevel@tonic-gate	.quad 0;			\
1197c478bd9Sstevel@tonic-gate	SET_SIZE(module/**/_modinfo)
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gate/*
1227c478bd9Sstevel@tonic-gate * The data section in the stub_common macro is the
1237c478bd9Sstevel@tonic-gate * mod_stub_info structure for the stub function
1247c478bd9Sstevel@tonic-gate */
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gate#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak)		\
1277c478bd9Sstevel@tonic-gate	ENTRY(fcnname);							\
1287c478bd9Sstevel@tonic-gate	leaq	fcnname/**/_info(%rip), %rax;				\
1297c478bd9Sstevel@tonic-gate	cmpl	$0, MODS_FLAG(%rax);			/* weak? */	\
1307c478bd9Sstevel@tonic-gate	je	stubs_common_code;			/* not weak */	\
1317c478bd9Sstevel@tonic-gate	testb	$MODS_INSTALLED, MODS_FLAG(%rax);	/* installed? */ \
1327c478bd9Sstevel@tonic-gate	jne	stubs_common_code;		/* yes, do the mod_hold */ \
1337c478bd9Sstevel@tonic-gate	jmp	*MODS_RETFCN(%rax);		/* no, jump to retfcn */ \
1347c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
1357c478bd9Sstevel@tonic-gate	.data;								\
1367c478bd9Sstevel@tonic-gate	.align	 CPTRSIZE;						\
1377c478bd9Sstevel@tonic-gate	.type	fcnname/**/_info, @object;				\
1387c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
1397c478bd9Sstevel@tonic-gate	.quad	install_fcn;		/* 0 */				\
1407c478bd9Sstevel@tonic-gate	.quad	module/**/_modinfo;	/* 0x8 */			\
1417c478bd9Sstevel@tonic-gate	.quad	fcnname;		/* 0x10 */			\
1427c478bd9Sstevel@tonic-gate	.quad	retfcn;			/* 0x18 */			\
1437c478bd9Sstevel@tonic-gate	.long	weak;			/* 0x20 */			\
1447c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname/**/_info)
1457c478bd9Sstevel@tonic-gate
1467c478bd9Sstevel@tonic-gate#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
1477c478bd9Sstevel@tonic-gate	ENTRY(fcnname);							\
1487c478bd9Sstevel@tonic-gate	leaq	fcnname/**/_info(%rip), %rax;				\
1497c478bd9Sstevel@tonic-gate	testb	$MODS_INSTALLED, MODS_FLAG(%rax); /* installed? */	\
1507c478bd9Sstevel@tonic-gate	je	5f;			/* no */			\
1517c478bd9Sstevel@tonic-gate	jmp	*(%rax);		/* yes, jump to install_fcn */	\
1527c478bd9Sstevel@tonic-gate5:	testb	$MODS_WEAK, MODS_FLAG(%rax);	/* weak? */		\
1537c478bd9Sstevel@tonic-gate	je	stubs_common_code;	/* no, do mod load */		\
1547c478bd9Sstevel@tonic-gate	jmp	*MODS_RETFCN(%rax);	/* yes, jump to retfcn */	\
1557c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
1567c478bd9Sstevel@tonic-gate	.data;								\
1577c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;						\
1587c478bd9Sstevel@tonic-gate	.type	fcnname/**/_info, @object;				\
1597c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
1607c478bd9Sstevel@tonic-gate	.quad	install_fcn;		/* 0 */				\
1617c478bd9Sstevel@tonic-gate	.quad	module/**/_modinfo;	/* 0x8 */			\
1627c478bd9Sstevel@tonic-gate	.quad	fcnname;		/* 0x10 */			\
1637c478bd9Sstevel@tonic-gate	.quad	retfcn;			/* 0x18 */			\
1647c478bd9Sstevel@tonic-gate	.long   weak;			/* 0x20 */			\
1657c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname/**/_info)
1667c478bd9Sstevel@tonic-gate
1677c478bd9Sstevel@tonic-gate/*
1687c478bd9Sstevel@tonic-gate * We branch here with the fcnname_info pointer in %rax
1697c478bd9Sstevel@tonic-gate */
1707c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_common_code)
1717c478bd9Sstevel@tonic-gate	.globl	mod_hold_stub
1727c478bd9Sstevel@tonic-gate	.globl	mod_release_stub
1737c478bd9Sstevel@tonic-gate	pushq	%rbp
1747c478bd9Sstevel@tonic-gate	movq	%rsp, %rbp
1757c478bd9Sstevel@tonic-gate	subq	$0x10, %rsp
1767c478bd9Sstevel@tonic-gate	movq	%r15, (%rsp)		/* (caller saved) */
1777c478bd9Sstevel@tonic-gate	movq	%rax, %r15		/* stash the fcnname_info pointer */
1787c478bd9Sstevel@tonic-gate	/*
1797c478bd9Sstevel@tonic-gate	 * save incoming register arguments
1807c478bd9Sstevel@tonic-gate	 */
1817c478bd9Sstevel@tonic-gate	pushq	%rdi
1827c478bd9Sstevel@tonic-gate	pushq	%rsi
1837c478bd9Sstevel@tonic-gate	pushq	%rdx
1847c478bd9Sstevel@tonic-gate	pushq	%rcx
1857c478bd9Sstevel@tonic-gate	pushq	%r8
1867c478bd9Sstevel@tonic-gate	pushq	%r9
1877c478bd9Sstevel@tonic-gate	/* (next 4 args, if any, are already on the stack above %rbp) */
1887c478bd9Sstevel@tonic-gate	movq	%r15, %rdi
1897c478bd9Sstevel@tonic-gate	call	mod_hold_stub		/* mod_hold_stub(mod_stub_info *) */
1907c478bd9Sstevel@tonic-gate	cmpl	$-1, %eax		/* error? */
1917c478bd9Sstevel@tonic-gate	jne	.L1
1927c478bd9Sstevel@tonic-gate	movq	0x18(%r15), %rax
1937c478bd9Sstevel@tonic-gate	call	*%rax
1947c478bd9Sstevel@tonic-gate	addq	$0x30, %rsp
1957c478bd9Sstevel@tonic-gate	jmp	.L2
1967c478bd9Sstevel@tonic-gate.L1:
1977c478bd9Sstevel@tonic-gate	/*
1987c478bd9Sstevel@tonic-gate	 * copy MAXNARG == 10 incoming arguments
1997c478bd9Sstevel@tonic-gate	 */
2007c478bd9Sstevel@tonic-gate	popq	%r9
2017c478bd9Sstevel@tonic-gate	popq	%r8
2027c478bd9Sstevel@tonic-gate	popq	%rcx
2037c478bd9Sstevel@tonic-gate	popq	%rdx
2047c478bd9Sstevel@tonic-gate	popq	%rsi
2057c478bd9Sstevel@tonic-gate	popq	%rdi
2067c478bd9Sstevel@tonic-gate	/*
2077c478bd9Sstevel@tonic-gate	 * stack:
2087c478bd9Sstevel@tonic-gate	 *	arg9		0x38(%rsp)
2097c478bd9Sstevel@tonic-gate	 *	arg8		0x30(%rsp)
2107c478bd9Sstevel@tonic-gate	 *	arg7		0x28(%rsp)
2117c478bd9Sstevel@tonic-gate	 *	arg6		0x20(%rsp)
2127c478bd9Sstevel@tonic-gate	 *	saved %rip	0x18(%rsp)
2137c478bd9Sstevel@tonic-gate	 *	saved %rbp	0x10(%rsp)
2147c478bd9Sstevel@tonic-gate	 *	<pad>		0x8(%rsp)
2157c478bd9Sstevel@tonic-gate	 *	saved %r15	0x0(%rsp)
2167c478bd9Sstevel@tonic-gate	 */
2177c478bd9Sstevel@tonic-gate	movl	$MAXNARG - 6 + 3, %r11d
2187c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2197c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2207c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2217c478bd9Sstevel@tonic-gate	pushq	(%rsp, %r11, 8)
2227c478bd9Sstevel@tonic-gate	call	*(%r15)			/* call the stub fn(arg, ..) */
2237c478bd9Sstevel@tonic-gate	addq	$0x20, %rsp		/* pop off last 4 args */
2247c478bd9Sstevel@tonic-gate	pushq	%rax			/* save any return values */
2257c478bd9Sstevel@tonic-gate	pushq	%rdx
2267c478bd9Sstevel@tonic-gate	movq	%r15, %rdi
2277c478bd9Sstevel@tonic-gate	call	mod_release_stub	/* release hold on module */
2287c478bd9Sstevel@tonic-gate	popq	%rdx			/* restore return values */
2297c478bd9Sstevel@tonic-gate	popq	%rax
2307c478bd9Sstevel@tonic-gate.L2:
2317c478bd9Sstevel@tonic-gate	popq	%r15
2327c478bd9Sstevel@tonic-gate	leave
2337c478bd9Sstevel@tonic-gate	ret
2347c478bd9Sstevel@tonic-gate	SET_SIZE(stubs_common_code)
2357c478bd9Sstevel@tonic-gate
2367c478bd9Sstevel@tonic-gate#elif defined(__i386)
2377c478bd9Sstevel@tonic-gate
2387c478bd9Sstevel@tonic-gate/*
2397c478bd9Sstevel@tonic-gate * See the 'struct mod_modinfo' definition to see what this declaration
2407c478bd9Sstevel@tonic-gate * is trying to achieve here.
2417c478bd9Sstevel@tonic-gate */
2427c478bd9Sstevel@tonic-gate#define MODULE(module,namespace)	\
2437c478bd9Sstevel@tonic-gate	.data;				\
2447c478bd9Sstevel@tonic-gatemodule/**/_modname:			\
2457c478bd9Sstevel@tonic-gate	.string	"namespace/module";	\
2467c478bd9Sstevel@tonic-gate	SET_SIZE(module/**/_modname);	\
2477c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
2487c478bd9Sstevel@tonic-gate	.globl	module/**/_modinfo;	\
2497c478bd9Sstevel@tonic-gate	.type	module/**/_modinfo, @object;	\
2507c478bd9Sstevel@tonic-gatemodule/**/_modinfo:			\
2517c478bd9Sstevel@tonic-gate	.long	module/**/_modname;	\
2527c478bd9Sstevel@tonic-gate	.long	0	/* storage for modctl pointer */
2537c478bd9Sstevel@tonic-gate
2547c478bd9Sstevel@tonic-gate	/* then mod_stub_info structures follow until a mods_func_adr is 0 */
2557c478bd9Sstevel@tonic-gate
2567c478bd9Sstevel@tonic-gate/* this puts a 0 where the next mods_func_adr would be */
2577c478bd9Sstevel@tonic-gate#define END_MODULE(module)		\
2587c478bd9Sstevel@tonic-gate	.data;				\
2597c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;		\
2607c478bd9Sstevel@tonic-gate	.long 0;			\
2617c478bd9Sstevel@tonic-gate	SET_SIZE(module/**/_modinfo)
2627c478bd9Sstevel@tonic-gate
2637c478bd9Sstevel@tonic-gate/*
2647c478bd9Sstevel@tonic-gate * The data section in the stub_common macro is the
2657c478bd9Sstevel@tonic-gate * mod_stub_info structure for the stub function
2667c478bd9Sstevel@tonic-gate */
2677c478bd9Sstevel@tonic-gate
2687c478bd9Sstevel@tonic-gate/*
2697c478bd9Sstevel@tonic-gate * The flag MODS_INSTALLED is stored in the stub data and is used to
2707c478bd9Sstevel@tonic-gate * indicate if a module is installed and initialized.  This flag is used
2717c478bd9Sstevel@tonic-gate * instead of the mod_stub_info->mods_modinfo->mod_installed flag
2727c478bd9Sstevel@tonic-gate * to minimize the number of pointer de-references for each function
2737c478bd9Sstevel@tonic-gate * call (and also to avoid possible TLB misses which could be induced
2747c478bd9Sstevel@tonic-gate * by dereferencing these pointers.)
2757c478bd9Sstevel@tonic-gate */
2767c478bd9Sstevel@tonic-gate
2777c478bd9Sstevel@tonic-gate#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak)		\
2787c478bd9Sstevel@tonic-gate	ENTRY(fcnname);							\
2797c478bd9Sstevel@tonic-gate	leal	fcnname/**/_info, %eax;					\
2807c478bd9Sstevel@tonic-gate	cmpl	$0, MODS_FLAG(%eax);	/* weak? */			\
2817c478bd9Sstevel@tonic-gate	je	stubs_common_code;	/* not weak */			\
2827c478bd9Sstevel@tonic-gate	testb	$MODS_INSTALLED, MODS_FLAG(%eax); /* installed? */	\
2837c478bd9Sstevel@tonic-gate	jne	stubs_common_code;	/* yes, do the mod_hold */	\
2847c478bd9Sstevel@tonic-gate	jmp	*MODS_RETFCN(%eax);	/* no, just jump to retfcn */	\
2857c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
2867c478bd9Sstevel@tonic-gate	.data;								\
2877c478bd9Sstevel@tonic-gate	.align	 CPTRSIZE;						\
2887c478bd9Sstevel@tonic-gate	.type	fcnname/**/_info, @object;				\
2897c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
2907c478bd9Sstevel@tonic-gate	.long	install_fcn;						\
2917c478bd9Sstevel@tonic-gate	.long	module/**/_modinfo;					\
2927c478bd9Sstevel@tonic-gate	.long	fcnname;						\
2937c478bd9Sstevel@tonic-gate	.long	retfcn;							\
2947c478bd9Sstevel@tonic-gate	.long   weak;							\
2957c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname/**/_info)
2967c478bd9Sstevel@tonic-gate
2977c478bd9Sstevel@tonic-gate#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
2987c478bd9Sstevel@tonic-gate	ENTRY(fcnname);							\
2997c478bd9Sstevel@tonic-gate	leal	fcnname/**/_info, %eax;					\
3007c478bd9Sstevel@tonic-gate	testb	$MODS_INSTALLED, MODS_FLAG(%eax); /* installed? */	\
3017c478bd9Sstevel@tonic-gate	je	5f;		/* no */				\
3027c478bd9Sstevel@tonic-gate	jmp	*(%eax);	/* yes, just jump to install_fcn */	\
3037c478bd9Sstevel@tonic-gate5:	testb	$MODS_WEAK, MODS_FLAG(%eax);	/* weak? */		\
3047c478bd9Sstevel@tonic-gate	je	stubs_common_code;	/* no, do mod load */		\
3057c478bd9Sstevel@tonic-gate	jmp	*MODS_RETFCN(%eax);	/* yes, just jump to retfcn */ 	\
3067c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname);						\
3077c478bd9Sstevel@tonic-gate	.data;								\
3087c478bd9Sstevel@tonic-gate	.align	CPTRSIZE;						\
3097c478bd9Sstevel@tonic-gate	.type	fcnname/**/_info, @object;				\
3107c478bd9Sstevel@tonic-gatefcnname/**/_info:							\
3117c478bd9Sstevel@tonic-gate	.long	install_fcn;		/* 0 */				\
3127c478bd9Sstevel@tonic-gate	.long	module/**/_modinfo;	/* 0x4 */			\
3137c478bd9Sstevel@tonic-gate	.long	fcnname;		/* 0x8 */			\
3147c478bd9Sstevel@tonic-gate	.long	retfcn;			/* 0xc */			\
3157c478bd9Sstevel@tonic-gate	.long   weak;			/* 0x10 */			\
3167c478bd9Sstevel@tonic-gate	SET_SIZE(fcnname/**/_info)
3177c478bd9Sstevel@tonic-gate
3187c478bd9Sstevel@tonic-gate/*
3197c478bd9Sstevel@tonic-gate * We branch here with the fcnname_info pointer in %eax
3207c478bd9Sstevel@tonic-gate */
3217c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_common_code)
3227c478bd9Sstevel@tonic-gate	.globl	mod_hold_stub
3237c478bd9Sstevel@tonic-gate	.globl	mod_release_stub
3247c478bd9Sstevel@tonic-gate	pushl	%esi
3257c478bd9Sstevel@tonic-gate	movl	%eax, %esi		/ save the info pointer
3267c478bd9Sstevel@tonic-gate	pushl	%eax
3277c478bd9Sstevel@tonic-gate	call	mod_hold_stub		/ mod_hold_stub(mod_stub_info *)
3287c478bd9Sstevel@tonic-gate	popl	%ecx
3297c478bd9Sstevel@tonic-gate	cmpl	$-1, %eax		/ error?
3307c478bd9Sstevel@tonic-gate	jne	.L1
3317c478bd9Sstevel@tonic-gate	movl	MODS_RETFCN(%esi), %eax
3327c478bd9Sstevel@tonic-gate	call    *%eax
3337c478bd9Sstevel@tonic-gate	popl	%esi			/ yes, return error (panic?)
3347c478bd9Sstevel@tonic-gate	ret
3357c478bd9Sstevel@tonic-gate.L1:
3367c478bd9Sstevel@tonic-gate	movl	$MAXNARG+1, %ecx
3377c478bd9Sstevel@tonic-gate	/ copy incoming arguments
3387c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)		/ push MAXNARG times
3397c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3407c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3417c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3427c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3437c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3447c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3457c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3467c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3477c478bd9Sstevel@tonic-gate	pushl	(%esp, %ecx, 4)
3487c478bd9Sstevel@tonic-gate	call	*(%esi)			/ call the stub function(arg1,arg2, ...)
3497c478bd9Sstevel@tonic-gate	add	$_MUL(MAXNARG, 4), %esp	/ pop off MAXNARG arguments
3507c478bd9Sstevel@tonic-gate	pushl	%eax			/ save any return values from the stub
3517c478bd9Sstevel@tonic-gate	pushl	%edx
3527c478bd9Sstevel@tonic-gate	pushl	%esi
3537c478bd9Sstevel@tonic-gate	call	mod_release_stub	/ release hold on module
3547c478bd9Sstevel@tonic-gate	addl	$4, %esp
3557c478bd9Sstevel@tonic-gate	popl	%edx			/ restore return values
3567c478bd9Sstevel@tonic-gate	popl	%eax
3577c478bd9Sstevel@tonic-gate.L2:
3587c478bd9Sstevel@tonic-gate	popl	%esi
3597c478bd9Sstevel@tonic-gate	ret
3607c478bd9Sstevel@tonic-gate	SET_SIZE(stubs_common_code)
3617c478bd9Sstevel@tonic-gate
3627c478bd9Sstevel@tonic-gate#endif	/* __i386 */
3637c478bd9Sstevel@tonic-gate
3647c478bd9Sstevel@tonic-gate#define STUB(module, fcnname, retfcn)	\
3657c478bd9Sstevel@tonic-gate    STUB_COMMON(module, fcnname, mod_hold_stub, retfcn, 0)
3667c478bd9Sstevel@tonic-gate
3677c478bd9Sstevel@tonic-gate/*
3687c478bd9Sstevel@tonic-gate * "weak stub", don't load on account of this call
3697c478bd9Sstevel@tonic-gate */
3707c478bd9Sstevel@tonic-gate#define WSTUB(module, fcnname, retfcn)	\
3717c478bd9Sstevel@tonic-gate    STUB_COMMON(module, fcnname, retfcn, retfcn, MODS_WEAK)
3727c478bd9Sstevel@tonic-gate
3737c478bd9Sstevel@tonic-gate/*
3747c478bd9Sstevel@tonic-gate * "non-unloadable stub", don't bother 'holding' module if it's already loaded
3757c478bd9Sstevel@tonic-gate * since the module cannot be unloaded.
3767c478bd9Sstevel@tonic-gate *
3777c478bd9Sstevel@tonic-gate * User *MUST* guarantee the module is not unloadable (no _fini routine).
3787c478bd9Sstevel@tonic-gate */
3797c478bd9Sstevel@tonic-gate#define NO_UNLOAD_STUB(module, fcnname, retfcn) \
3807c478bd9Sstevel@tonic-gate    STUB_UNLOADABLE(module, fcnname,  retfcn, retfcn, MODS_NOUNLOAD)
3817c478bd9Sstevel@tonic-gate
3827c478bd9Sstevel@tonic-gate/*
3837c478bd9Sstevel@tonic-gate * "weak stub" for non-unloadable module, don't load on account of this call
3847c478bd9Sstevel@tonic-gate */
3857c478bd9Sstevel@tonic-gate#define NO_UNLOAD_WSTUB(module, fcnname, retfcn) \
3867c478bd9Sstevel@tonic-gate    STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD|MODS_WEAK)
3877c478bd9Sstevel@tonic-gate
3887c478bd9Sstevel@tonic-gate/*
3897c478bd9Sstevel@tonic-gate * this is just a marker for the beginning area of text that contains stubs
3907c478bd9Sstevel@tonic-gate */
3917c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_base)
3927c478bd9Sstevel@tonic-gate	nop
3937c478bd9Sstevel@tonic-gate
3947c478bd9Sstevel@tonic-gate/*
3957c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING!!!!!!
3967c478bd9Sstevel@tonic-gate *
3977c478bd9Sstevel@tonic-gate * On the MODULE macro you MUST NOT use any spaces!!! They are
3987c478bd9Sstevel@tonic-gate * significant to the preprocessor.  With ansi c there is a way around this
3997c478bd9Sstevel@tonic-gate * but for some reason (yet to be investigated) ansi didn't work for other
4007c478bd9Sstevel@tonic-gate * reasons!
4017c478bd9Sstevel@tonic-gate *
4027c478bd9Sstevel@tonic-gate * When zero is used as the return function, the system will call
4037c478bd9Sstevel@tonic-gate * panic if the stub can't be resolved.
4047c478bd9Sstevel@tonic-gate */
4057c478bd9Sstevel@tonic-gate
4067c478bd9Sstevel@tonic-gate/*
4077c478bd9Sstevel@tonic-gate * Stubs for devfs. A non-unloadable module.
4087c478bd9Sstevel@tonic-gate */
4097c478bd9Sstevel@tonic-gate
4107c478bd9Sstevel@tonic-gate#ifndef	DEVFS_MODULE
4117c478bd9Sstevel@tonic-gate	MODULE(devfs,fs);
4127c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_clean,		nomod_minus_one);
4137c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_lookupname,		nomod_minus_one);
4147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_walk,		nomod_minus_one);
4157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_devpolicy,		nomod_minus_one);
4167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_reset_perm,		nomod_minus_one);
4177c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(devfs, devfs_remdrv_cleanup,	nomod_minus_one);
4187c478bd9Sstevel@tonic-gate	END_MODULE(devfs);
4197c478bd9Sstevel@tonic-gate#endif
4207c478bd9Sstevel@tonic-gate
421facf4a8dSllai1#ifndef	DEV_MODULE
422facf4a8dSllai1	MODULE(dev,fs);
423facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_modctl_readdir,	nomod_minus_one);
424facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_modctl_readdir_free,	nomod_minus_one);
425facf4a8dSllai1	NO_UNLOAD_STUB(dev, devname_filename_register,	nomod_minus_one);
426facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_modctl_devexists,	nomod_minus_one);
427facf4a8dSllai1	NO_UNLOAD_STUB(dev, devname_profile_update,	nomod_minus_one);
428facf4a8dSllai1	NO_UNLOAD_STUB(dev, sdev_devstate_change,	nomod_minus_one);
429aecfc01dSrui zang - Sun Microsystems - Beijing China	NO_UNLOAD_STUB(dev, devvt_getvnodeops,		nomod_minus_one);
430facf4a8dSllai1	NO_UNLOAD_STUB(dev, devpts_getvnodeops,		nomod_zero);
431facf4a8dSllai1	END_MODULE(dev);
432facf4a8dSllai1#endif
433facf4a8dSllai1
4347c478bd9Sstevel@tonic-gate/*
4357c478bd9Sstevel@tonic-gate * Stubs for specfs. A non-unloadable module.
4367c478bd9Sstevel@tonic-gate */
4377c478bd9Sstevel@tonic-gate
4387c478bd9Sstevel@tonic-gate#ifndef SPEC_MODULE
4397c478bd9Sstevel@tonic-gate	MODULE(specfs,fs);
4407c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, common_specvp,		nomod_zero);
4417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, makectty,		nomod_zero);
4427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, makespecvp,     		nomod_zero);
4437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, smark,          		nomod_zero);
4447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_segmap,    		nomod_einval);
4457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, specfind,       		nomod_zero);
4467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, specvp,         		nomod_zero);
4477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, devi_stillreferenced,	nomod_zero);
4487c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_getvnodeops,	nomod_zero);
4497c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_char_map,		nomod_zero);
4507c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, specvp_devfs,  		nomod_zero);
4517c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_assoc_vp_with_devi,	nomod_void);
4527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_hold_devi_by_vp,	nomod_zero);
4537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_snode_walk,		nomod_void);
4547c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_devi_open_count,	nomod_minus_one);
4557c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_is_clone,		nomod_zero);
4567c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(specfs, spec_is_selfclone,	nomod_zero);
45725e8c5aaSvikram	NO_UNLOAD_STUB(specfs, spec_fence_snode,	nomod_minus_one);
45825e8c5aaSvikram	NO_UNLOAD_STUB(specfs, spec_unfence_snode,	nomod_minus_one);
4597c478bd9Sstevel@tonic-gate	END_MODULE(specfs);
4607c478bd9Sstevel@tonic-gate#endif
4617c478bd9Sstevel@tonic-gate
4627c478bd9Sstevel@tonic-gate
4637c478bd9Sstevel@tonic-gate/*
4647c478bd9Sstevel@tonic-gate * Stubs for sockfs. A non-unloadable module.
4657c478bd9Sstevel@tonic-gate */
4667c478bd9Sstevel@tonic-gate#ifndef SOCK_MODULE
4677c478bd9Sstevel@tonic-gate	MODULE(sockfs,fs);
4687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, so_socket,  	nomod_zero);
4697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, so_socketpair,	nomod_zero);
4707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, bind,  		nomod_zero);
4717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, listen,  	nomod_zero);
4727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, accept,  	nomod_zero);
4737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, connect,  	nomod_zero);
4747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, shutdown,  	nomod_zero);
4757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recv,  		nomod_zero);
4767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recvfrom,  	nomod_zero);
4777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recvmsg,  	nomod_zero);
4787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, send,  		nomod_zero);
4797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sendmsg,  	nomod_zero);
4807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sendto,  	nomod_zero);
4817c478bd9Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL
4827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recv32,		nomod_zero);
4837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, recvfrom32,	nomod_zero);
4847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, send32,		nomod_zero);
4857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sendto32,	nomod_zero);
4867c478bd9Sstevel@tonic-gate#endif	/* _SYSCALL32_IMPL */
4877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, getpeername,  	nomod_zero);
4887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, getsockname,  	nomod_zero);
4897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, getsockopt,  	nomod_zero);
4907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, setsockopt,  	nomod_zero);
4917c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sockconfig,  	nomod_zero);
4927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sock_getmsg,  	nomod_zero);
4937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sock_putmsg,  	nomod_zero);
4947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sosendfile64,  	nomod_zero);
49574024373Spr14459	NO_UNLOAD_STUB(sockfs, snf_segmap,  	nomod_einval);
4967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, sock_getfasync,  nomod_zero);
4977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sockfs, nl7c_sendfilev,  nomod_zero);
4980f1702c5SYu Xiangning	NO_UNLOAD_STUB(sockfs, sotpi_sototpi,  nomod_zero);
4990f1702c5SYu Xiangning	NO_UNLOAD_STUB(sockfs, socket_sendmblk,  nomod_zero);
5000f1702c5SYu Xiangning	NO_UNLOAD_STUB(sockfs, socket_setsockopt,  nomod_zero);
5017c478bd9Sstevel@tonic-gate	END_MODULE(sockfs);
5027c478bd9Sstevel@tonic-gate#endif
5037c478bd9Sstevel@tonic-gate
5047c478bd9Sstevel@tonic-gate/*
5057c478bd9Sstevel@tonic-gate * IPsec stubs.
5067c478bd9Sstevel@tonic-gate */
5077c478bd9Sstevel@tonic-gate
5087c478bd9Sstevel@tonic-gate#ifndef	IPSECAH_MODULE
5097c478bd9Sstevel@tonic-gate	MODULE(ipsecah,drv);
5107c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsec_construct_inverse_acquire,	nomod_zero);
5117c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_acquire,		nomod_zero);
5127c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_algs_changed,	nomod_zero);
5137c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_alg_update,	nomod_zero);
5147c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_unlinkassoc,	nomod_zero);
5157c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_insertassoc,	nomod_zero);
5167c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_in_assocfailure,	nomod_zero);
5177c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	sadb_set_lpkt,		nomod_zero);
5187c478bd9Sstevel@tonic-gate	WSTUB(ipsecah,	ipsecah_icmp_error,	nomod_zero);
5197c478bd9Sstevel@tonic-gate	END_MODULE(ipsecah);
5207c478bd9Sstevel@tonic-gate#endif
5217c478bd9Sstevel@tonic-gate
5227c478bd9Sstevel@tonic-gate#ifndef	IPSECESP_MODULE
5237c478bd9Sstevel@tonic-gate	MODULE(ipsecesp,drv);
5247c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_fill_defs,	nomod_zero);
5257c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_algs_changed,	nomod_zero);
5267c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp, ipsecesp_in_assocfailure,	nomod_zero);
5277c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp, ipsecesp_init_funcs,	nomod_zero);
5287c478bd9Sstevel@tonic-gate	WSTUB(ipsecesp,	ipsecesp_icmp_error,	nomod_zero);
529437220cdSdanmcd	WSTUB(ipsecesp,	ipsecesp_send_keepalive,	nomod_zero);
5307c478bd9Sstevel@tonic-gate	END_MODULE(ipsecesp);
5317c478bd9Sstevel@tonic-gate#endif
5327c478bd9Sstevel@tonic-gate
5337c478bd9Sstevel@tonic-gate#ifndef	KEYSOCK_MODULE
5347c478bd9Sstevel@tonic-gate	MODULE(keysock,	drv);
5357c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_plumb_ipsec,	nomod_zero);
5367c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_extended_reg,	nomod_zero);
5377c478bd9Sstevel@tonic-gate	WSTUB(keysock,	keysock_next_seq,	nomod_zero);
5387c478bd9Sstevel@tonic-gate	END_MODULE(keysock);
5397c478bd9Sstevel@tonic-gate#endif
5407c478bd9Sstevel@tonic-gate
5417c478bd9Sstevel@tonic-gate#ifndef SPDSOCK_MODULE
5427c478bd9Sstevel@tonic-gate	MODULE(spdsock,drv);
5437c478bd9Sstevel@tonic-gate	WSTUB(spdsock,	spdsock_update_pending_algs,	nomod_zero);
5447c478bd9Sstevel@tonic-gate	END_MODULE(spdsock);
5457c478bd9Sstevel@tonic-gate#endif
5467c478bd9Sstevel@tonic-gate
5477c478bd9Sstevel@tonic-gate/*
5487c478bd9Sstevel@tonic-gate * Stubs for nfs common code.
5497c478bd9Sstevel@tonic-gate * XXX nfs_getvnodeops should go away with removal of kludge in vnode.c
5507c478bd9Sstevel@tonic-gate */
5517c478bd9Sstevel@tonic-gate#ifndef NFS_MODULE
5527c478bd9Sstevel@tonic-gate	MODULE(nfs,fs);
5537c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_getvnodeops,	nomod_zero);
5547c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_perror,		nomod_zero);
5557c478bd9Sstevel@tonic-gate	WSTUB(nfs,	nfs_cmn_err,		nomod_zero);
5567c478bd9Sstevel@tonic-gate	WSTUB(nfs,	clcleanup_zone,		nomod_zero);
5577c478bd9Sstevel@tonic-gate	WSTUB(nfs,	clcleanup4_zone,	nomod_zero);
5587c478bd9Sstevel@tonic-gate	END_MODULE(nfs);
5597c478bd9Sstevel@tonic-gate#endif
5607c478bd9Sstevel@tonic-gate
5617c478bd9Sstevel@tonic-gate
5627c478bd9Sstevel@tonic-gate/*
5637c478bd9Sstevel@tonic-gate * Stubs for nfs_dlboot (diskless booting).
5647c478bd9Sstevel@tonic-gate */
5657c478bd9Sstevel@tonic-gate#ifndef NFS_DLBOOT_MODULE
5667c478bd9Sstevel@tonic-gate	MODULE(nfs_dlboot,misc);
5677c478bd9Sstevel@tonic-gate	STUB(nfs_dlboot,	mount_root,	nomod_minus_one);
5687c478bd9Sstevel@tonic-gate	STUB(nfs_dlboot,	dhcpinit,	nomod_minus_one);
5697c478bd9Sstevel@tonic-gate	END_MODULE(nfs_dlboot);
5707c478bd9Sstevel@tonic-gate#endif
5717c478bd9Sstevel@tonic-gate
5727c478bd9Sstevel@tonic-gate/*
5737c478bd9Sstevel@tonic-gate * Stubs for nfs server-only code.
5747c478bd9Sstevel@tonic-gate */
5757c478bd9Sstevel@tonic-gate#ifndef NFSSRV_MODULE
5767c478bd9Sstevel@tonic-gate	MODULE(nfssrv,misc);
5777c478bd9Sstevel@tonic-gate	STUB(nfssrv,		exportfs,	nomod_minus_one);
5787c478bd9Sstevel@tonic-gate	STUB(nfssrv,		nfs_getfh,	nomod_minus_one);
5797c478bd9Sstevel@tonic-gate	STUB(nfssrv,		nfsl_flush,	nomod_minus_one);
5807c478bd9Sstevel@tonic-gate	STUB(nfssrv,		rfs4_check_delegated, nomod_zero);
5811cc55349Srmesta	STUB(nfssrv,		mountd_args,	nomod_minus_one);
5827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(nfssrv,	rdma_start,	nomod_zero);
5837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(nfssrv,	nfs_svc,	nomod_zero);
5847c478bd9Sstevel@tonic-gate	END_MODULE(nfssrv);
5857c478bd9Sstevel@tonic-gate#endif
5867c478bd9Sstevel@tonic-gate
5877c478bd9Sstevel@tonic-gate/*
5887c478bd9Sstevel@tonic-gate * Stubs for kernel lock manager.
5897c478bd9Sstevel@tonic-gate */
5907c478bd9Sstevel@tonic-gate#ifndef KLM_MODULE
5917c478bd9Sstevel@tonic-gate	MODULE(klmmod,misc);
5927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_svc,		nomod_zero);
5937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_shutdown,	nomod_zero);
5947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_unexport,	nomod_zero);
5952df1fe9cSrandyf	NO_UNLOAD_STUB(klmmod, lm_cprresume,	nomod_zero);
5962df1fe9cSrandyf	NO_UNLOAD_STUB(klmmod, lm_cprsuspend,	nomod_zero);
5977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_safelock, nomod_zero);
5987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_safemap, nomod_zero);
5997c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_has_sleep, nomod_zero);
6007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_free_config, nomod_zero);
6017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_vp_active, nomod_zero);
6027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_get_sysid, nomod_zero);
6037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_rel_sysid, nomod_zero);
6047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_alloc_sysidt, nomod_minus_one);
6057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_free_sysidt, nomod_zero);
6067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmmod, lm_sysidt, nomod_minus_one);
6077c478bd9Sstevel@tonic-gate	END_MODULE(klmmod);
6087c478bd9Sstevel@tonic-gate#endif
6097c478bd9Sstevel@tonic-gate
6107c478bd9Sstevel@tonic-gate#ifndef KLMOPS_MODULE
6117c478bd9Sstevel@tonic-gate	MODULE(klmops,misc);
6127c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_frlock,	nomod_zero);
6137c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm4_frlock,	nomod_zero);
6147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_shrlock,	nomod_zero);
6157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm4_shrlock,	nomod_zero);
6167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm_dispatch,	nomod_zero);
6177c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm4_dispatch,	nomod_zero);
6187c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm_reclaim,	nomod_zero);
6197c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_nlm4_reclaim,	nomod_zero);
6207c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero);
6217c478bd9Sstevel@tonic-gate	END_MODULE(klmops);
6227c478bd9Sstevel@tonic-gate#endif
6237c478bd9Sstevel@tonic-gate
6247c478bd9Sstevel@tonic-gate/*
6257c478bd9Sstevel@tonic-gate * Stubs for kernel TLI module
6267c478bd9Sstevel@tonic-gate *   XXX currently we never allow this to unload
6277c478bd9Sstevel@tonic-gate */
6287c478bd9Sstevel@tonic-gate#ifndef TLI_MODULE
6297c478bd9Sstevel@tonic-gate	MODULE(tlimod,misc);
6307c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kopen,		nomod_minus_one);
6317c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kunbind,		nomod_zero);
6327c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kadvise,		nomod_zero);
6337c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_krcvudata,		nomod_zero);
6347c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_ksndudata,		nomod_zero);
6357c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kalloc,		nomod_zero);
6367c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kbind,		nomod_zero);
6377c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kclose,		nomod_zero);
6387c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kspoll,		nomod_zero);
6397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tlimod,	t_kfree,		nomod_zero);
6407c478bd9Sstevel@tonic-gate	END_MODULE(tlimod);
6417c478bd9Sstevel@tonic-gate#endif
6427c478bd9Sstevel@tonic-gate
6437c478bd9Sstevel@tonic-gate/*
6447c478bd9Sstevel@tonic-gate * Stubs for kernel RPC module
6457c478bd9Sstevel@tonic-gate *   XXX currently we never allow this to unload
6467c478bd9Sstevel@tonic-gate */
6477c478bd9Sstevel@tonic-gate#ifndef RPC_MODULE
6487c478bd9Sstevel@tonic-gate	MODULE(rpcmod,strmod);
6497c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod,	clnt_tli_kcreate,	nomod_minus_one);
6507c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod,	svc_tli_kcreate,	nomod_minus_one);
6517c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod,	bindresvport,		nomod_minus_one);
6527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, rdma_register_mod,	nomod_minus_one);
6537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod,	nomod_minus_one);
6547c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, svc_queuereq,		nomod_minus_one);
6557c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcmod, clist_add,		nomod_minus_one);
6567c478bd9Sstevel@tonic-gate	END_MODULE(rpcmod);
6577c478bd9Sstevel@tonic-gate#endif
6587c478bd9Sstevel@tonic-gate
6597c478bd9Sstevel@tonic-gate/*
6607c478bd9Sstevel@tonic-gate * Stubs for des
6617c478bd9Sstevel@tonic-gate */
6627c478bd9Sstevel@tonic-gate#ifndef DES_MODULE
6637c478bd9Sstevel@tonic-gate	MODULE(des,misc);
6647c478bd9Sstevel@tonic-gate	STUB(des, cbc_crypt, 	 	nomod_zero);
6657c478bd9Sstevel@tonic-gate	STUB(des, ecb_crypt, 		nomod_zero);
6667c478bd9Sstevel@tonic-gate	STUB(des, _des_crypt,		nomod_zero);
6677c478bd9Sstevel@tonic-gate	END_MODULE(des);
6687c478bd9Sstevel@tonic-gate#endif
6697c478bd9Sstevel@tonic-gate
6707c478bd9Sstevel@tonic-gate/*
6717c478bd9Sstevel@tonic-gate * Stubs for procfs. A non-unloadable module.
6727c478bd9Sstevel@tonic-gate */
6737c478bd9Sstevel@tonic-gate#ifndef PROC_MODULE
6747c478bd9Sstevel@tonic-gate	MODULE(procfs,fs);
6757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prfree,		nomod_zero);
6767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexit,		nomod_zero);
6777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prlwpfree,	nomod_zero);
6787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prlwpexit,	nomod_zero);
6797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prinvalidate,	nomod_zero);
6807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prnsegs,		nomod_zero);
6817c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetcred,	nomod_zero);
6827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpriv,	nomod_zero);
6837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetprivsize,	nomod_zero);
6847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetstatus,	nomod_zero);
6857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpstatus,	nomod_zero);
6867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpsinfo,	nomod_zero);
6877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpsinfo,	nomod_zero);
6887c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetstatus,	nomod_zero);
6897c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetpsinfo,	nomod_zero);
6907c478bd9Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL
6917c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetstatus32,	nomod_zero);
6927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpstatus32, nomod_zero);
6937c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetpsinfo32,	nomod_zero);
6947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prgetlwpsinfo32,	nomod_zero);
6957c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetstatus32,	nomod_zero);
6967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, oprgetpsinfo32,	nomod_zero);
697f971a346SBryan Cantrill	NO_UNLOAD_STUB(procfs, psinfo_kto32,	nomod_zero);
698f971a346SBryan Cantrill	NO_UNLOAD_STUB(procfs, lwpsinfo_kto32,	nomod_zero);
6997c478bd9Sstevel@tonic-gate#endif	/* _SYSCALL32_IMPL */
7007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prnotify,	nomod_zero);
7017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexecstart,	nomod_zero);
7027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prexecend,	nomod_zero);
7037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prrelvm,		nomod_zero);
7047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, prbarrier,	nomod_zero);
7057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, estimate_msacct,	nomod_zero);
7067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getprot,	nomod_zero);
7077c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getprot_done,	nomod_zero);
7087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_getsegsize,	nomod_zero);
7097c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_isobject,	nomod_zero);
7107c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_isself,	nomod_zero);
7117c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_allstopped,	nomod_zero);
7127c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(procfs, pr_free_watched_pages, nomod_zero);
7137c478bd9Sstevel@tonic-gate	END_MODULE(procfs);
7147c478bd9Sstevel@tonic-gate#endif
7157c478bd9Sstevel@tonic-gate
7167c478bd9Sstevel@tonic-gate/*
7177c478bd9Sstevel@tonic-gate * Stubs for fifofs
7187c478bd9Sstevel@tonic-gate */
7197c478bd9Sstevel@tonic-gate#ifndef FIFO_MODULE
7207c478bd9Sstevel@tonic-gate	MODULE(fifofs,fs);
7217c478bd9Sstevel@tonic-gate	STUB(fifofs, fifovp,      	0);
7227c478bd9Sstevel@tonic-gate	STUB(fifofs, fifo_getinfo,	0);
7237c478bd9Sstevel@tonic-gate	STUB(fifofs, fifo_vfastoff,	0);
7247c478bd9Sstevel@tonic-gate	END_MODULE(fifofs);
7257c478bd9Sstevel@tonic-gate#endif
7267c478bd9Sstevel@tonic-gate
7277c478bd9Sstevel@tonic-gate/*
7287c478bd9Sstevel@tonic-gate * Stubs for ufs
7297c478bd9Sstevel@tonic-gate *
7307c478bd9Sstevel@tonic-gate * This is needed to support the old quotactl system call.
7317c478bd9Sstevel@tonic-gate * When the old sysent stuff goes away, this will need to be revisited.
7327c478bd9Sstevel@tonic-gate */
7337c478bd9Sstevel@tonic-gate#ifndef UFS_MODULE
7347c478bd9Sstevel@tonic-gate	MODULE(ufs,fs);
7357c478bd9Sstevel@tonic-gate	STUB(ufs, quotactl, nomod_minus_one);
7367c478bd9Sstevel@tonic-gate	END_MODULE(ufs);
7377c478bd9Sstevel@tonic-gate#endif
7387c478bd9Sstevel@tonic-gate
7397c478bd9Sstevel@tonic-gate/*
740e7cbe64fSgw25295 * Stubs for zfs
741e7cbe64fSgw25295 */
742e7cbe64fSgw25295#ifndef ZFS_MODULE
743e7cbe64fSgw25295	MODULE(zfs,fs);
7448034149bSRic Aleshire	STUB(zfs, dsl_prop_get, nomod_minus_one);
745e7cbe64fSgw25295	STUB(zfs, spa_boot_init, nomod_minus_one);
7468034149bSRic Aleshire	STUB(zfs, zfs_prop_to_name, nomod_zero);
747e7cbe64fSgw25295	END_MODULE(zfs);
748e7cbe64fSgw25295#endif
749e7cbe64fSgw25295
750e7cbe64fSgw25295/*
751986fd29aSsetje * Stubs for dcfs
752986fd29aSsetje */
753986fd29aSsetje#ifndef DCFS_MODULE
754986fd29aSsetje	MODULE(dcfs,fs);
755986fd29aSsetje	STUB(dcfs, decompvp, 0);
756986fd29aSsetje	END_MODULE(dcfs);
757986fd29aSsetje#endif
758986fd29aSsetje
759986fd29aSsetje/*
7607c478bd9Sstevel@tonic-gate * Stubs for namefs
7617c478bd9Sstevel@tonic-gate */
7627c478bd9Sstevel@tonic-gate#ifndef NAMEFS_MODULE
7637c478bd9Sstevel@tonic-gate	MODULE(namefs,fs);
7647c478bd9Sstevel@tonic-gate	STUB(namefs, nm_unmountall, 	0);
7657c478bd9Sstevel@tonic-gate	END_MODULE(namefs);
7667c478bd9Sstevel@tonic-gate#endif
7677c478bd9Sstevel@tonic-gate
7687c478bd9Sstevel@tonic-gate/*
76935a5a358SJonathan Adams * Stubs for sysdc
77035a5a358SJonathan Adams */
77135a5a358SJonathan Adams#ifndef SDC_MODULE
77235a5a358SJonathan Adams	MODULE(SDC,sched);
77335a5a358SJonathan Adams	NO_UNLOAD_STUB(SDC, sysdc_thread_enter,		nomod_zero);
77435a5a358SJonathan Adams	END_MODULE(SDC);
77535a5a358SJonathan Adams#endif
77635a5a358SJonathan Adams
77735a5a358SJonathan Adams/*
7787c478bd9Sstevel@tonic-gate * Stubs for ts_dptbl
7797c478bd9Sstevel@tonic-gate */
7807c478bd9Sstevel@tonic-gate#ifndef TS_DPTBL_MODULE
7817c478bd9Sstevel@tonic-gate	MODULE(TS_DPTBL,sched);
7827c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getdptbl,		0);
7837c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getkmdpris,		0);
7847c478bd9Sstevel@tonic-gate	STUB(TS_DPTBL, ts_getmaxumdpri,	0);
7857c478bd9Sstevel@tonic-gate	END_MODULE(TS_DPTBL);
7867c478bd9Sstevel@tonic-gate#endif
7877c478bd9Sstevel@tonic-gate
7887c478bd9Sstevel@tonic-gate/*
7897c478bd9Sstevel@tonic-gate * Stubs for rt_dptbl
7907c478bd9Sstevel@tonic-gate */
7917c478bd9Sstevel@tonic-gate#ifndef RT_DPTBL_MODULE
7927c478bd9Sstevel@tonic-gate	MODULE(RT_DPTBL,sched);
7937c478bd9Sstevel@tonic-gate	STUB(RT_DPTBL, rt_getdptbl,		0);
7947c478bd9Sstevel@tonic-gate	END_MODULE(RT_DPTBL);
7957c478bd9Sstevel@tonic-gate#endif
7967c478bd9Sstevel@tonic-gate
7977c478bd9Sstevel@tonic-gate/*
7987c478bd9Sstevel@tonic-gate * Stubs for ia_dptbl
7997c478bd9Sstevel@tonic-gate */
8007c478bd9Sstevel@tonic-gate#ifndef IA_DPTBL_MODULE
8017c478bd9Sstevel@tonic-gate	MODULE(IA_DPTBL,sched);
8027c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getdptbl,		nomod_zero);
8037c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getkmdpris,		nomod_zero);
8047c478bd9Sstevel@tonic-gate	STUB(IA_DPTBL, ia_getmaxumdpri,	nomod_zero);
8057c478bd9Sstevel@tonic-gate	END_MODULE(IA_DPTBL);
8067c478bd9Sstevel@tonic-gate#endif
8077c478bd9Sstevel@tonic-gate
8087c478bd9Sstevel@tonic-gate/*
8097c478bd9Sstevel@tonic-gate * Stubs for FSS scheduler
8107c478bd9Sstevel@tonic-gate */
8117c478bd9Sstevel@tonic-gate#ifndef FSS_MODULE
8127c478bd9Sstevel@tonic-gate	MODULE(FSS,sched);
8137c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_allocbuf,		nomod_zero);
8147c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_freebuf,			nomod_zero);
8157c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_changeproj,		nomod_zero);
8167c478bd9Sstevel@tonic-gate	WSTUB(FSS, fss_changepset,		nomod_zero);
8177c478bd9Sstevel@tonic-gate	END_MODULE(FSS);
8187c478bd9Sstevel@tonic-gate#endif
8197c478bd9Sstevel@tonic-gate
8207c478bd9Sstevel@tonic-gate/*
8217c478bd9Sstevel@tonic-gate * Stubs for fx_dptbl
8227c478bd9Sstevel@tonic-gate */
8237c478bd9Sstevel@tonic-gate#ifndef FX_DPTBL_MODULE
8247c478bd9Sstevel@tonic-gate	MODULE(FX_DPTBL,sched);
8257c478bd9Sstevel@tonic-gate	STUB(FX_DPTBL, fx_getdptbl,		0);
8267c478bd9Sstevel@tonic-gate	STUB(FX_DPTBL, fx_getmaxumdpri,		0);
8277c478bd9Sstevel@tonic-gate	END_MODULE(FX_DPTBL);
8287c478bd9Sstevel@tonic-gate#endif
8297c478bd9Sstevel@tonic-gate
8307c478bd9Sstevel@tonic-gate/*
8317c478bd9Sstevel@tonic-gate * Stubs for bootdev
8327c478bd9Sstevel@tonic-gate */
8337c478bd9Sstevel@tonic-gate#ifndef BOOTDEV_MODULE
8347c478bd9Sstevel@tonic-gate	MODULE(bootdev,misc);
8357c478bd9Sstevel@tonic-gate	STUB(bootdev, i_promname_to_devname, 0);
8367c478bd9Sstevel@tonic-gate	STUB(bootdev, i_convert_boot_device_name, 0);
8377c478bd9Sstevel@tonic-gate	END_MODULE(bootdev);
8387c478bd9Sstevel@tonic-gate#endif
8397c478bd9Sstevel@tonic-gate
8407c478bd9Sstevel@tonic-gate/*
8417c478bd9Sstevel@tonic-gate * stubs for strplumb...
8427c478bd9Sstevel@tonic-gate */
8437c478bd9Sstevel@tonic-gate#ifndef STRPLUMB_MODULE
8447c478bd9Sstevel@tonic-gate	MODULE(strplumb,misc);
8457c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb,     0);
8467c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb_load, 0);
8477c478bd9Sstevel@tonic-gate	STUB(strplumb, strplumb_get_netdev_path, 0);
8487c478bd9Sstevel@tonic-gate	END_MODULE(strplumb);
8497c478bd9Sstevel@tonic-gate#endif
8507c478bd9Sstevel@tonic-gate
8517c478bd9Sstevel@tonic-gate/*
8527c478bd9Sstevel@tonic-gate * Stubs for console configuration module
8537c478bd9Sstevel@tonic-gate */
8547c478bd9Sstevel@tonic-gate#ifndef CONSCONFIG_MODULE
8557c478bd9Sstevel@tonic-gate	MODULE(consconfig,misc);
8567c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig,	0);
8577c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig_get_usb_kb_path,	0);
8587c478bd9Sstevel@tonic-gate	STUB(consconfig, consconfig_get_usb_ms_path,	0);
85948633f18SJan Setje-Eilers	STUB(consconfig, consconfig_get_plat_fbpath,	0);
86040482326SVincent Wang	STUB(consconfig, consconfig_console_is_ready,	0);
8617c478bd9Sstevel@tonic-gate	END_MODULE(consconfig);
8627c478bd9Sstevel@tonic-gate#endif
8637c478bd9Sstevel@tonic-gate
8647c478bd9Sstevel@tonic-gate/*
8657c478bd9Sstevel@tonic-gate * Stubs for accounting.
8667c478bd9Sstevel@tonic-gate */
8677c478bd9Sstevel@tonic-gate#ifndef SYSACCT_MODULE
8687c478bd9Sstevel@tonic-gate	MODULE(sysacct,sys);
8697c478bd9Sstevel@tonic-gate	WSTUB(sysacct, acct,  		nomod_zero);
8707c478bd9Sstevel@tonic-gate	WSTUB(sysacct, acct_fs_in_use, 	nomod_zero);
8717c478bd9Sstevel@tonic-gate	END_MODULE(sysacct);
8727c478bd9Sstevel@tonic-gate#endif
8737c478bd9Sstevel@tonic-gate
8747c478bd9Sstevel@tonic-gate/*
8757c478bd9Sstevel@tonic-gate * Stubs for semaphore routines. sem.c
8767c478bd9Sstevel@tonic-gate */
8777c478bd9Sstevel@tonic-gate#ifndef SEMSYS_MODULE
8787c478bd9Sstevel@tonic-gate	MODULE(semsys,sys);
8797c478bd9Sstevel@tonic-gate	WSTUB(semsys, semexit,		nomod_zero);
8807c478bd9Sstevel@tonic-gate	END_MODULE(semsys);
8817c478bd9Sstevel@tonic-gate#endif
8827c478bd9Sstevel@tonic-gate
8837c478bd9Sstevel@tonic-gate/*
8847c478bd9Sstevel@tonic-gate * Stubs for shmem routines. shm.c
8857c478bd9Sstevel@tonic-gate */
8867c478bd9Sstevel@tonic-gate#ifndef SHMSYS_MODULE
8877c478bd9Sstevel@tonic-gate	MODULE(shmsys,sys);
8887c478bd9Sstevel@tonic-gate	WSTUB(shmsys, shmexit,		nomod_zero);
8897c478bd9Sstevel@tonic-gate	WSTUB(shmsys, shmfork,		nomod_zero);
89030da1432Sahl	WSTUB(shmsys, shmgetid,		nomod_minus_one);
8917c478bd9Sstevel@tonic-gate	END_MODULE(shmsys);
8927c478bd9Sstevel@tonic-gate#endif
8937c478bd9Sstevel@tonic-gate
8947c478bd9Sstevel@tonic-gate/*
8957c478bd9Sstevel@tonic-gate * Stubs for doors
8967c478bd9Sstevel@tonic-gate */
8977c478bd9Sstevel@tonic-gate#ifndef DOOR_MODULE
8987c478bd9Sstevel@tonic-gate	MODULE(doorfs,sys);
8997c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_slam,			nomod_zero);
9007c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_exit,			nomod_zero);
9017c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_revoke_all,			nomod_zero);
9027c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_fork,			nomod_zero);
9037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_upcall,		nomod_einval);
9047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_create,		nomod_einval);
9057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_open,		nomod_einval);
9067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(doorfs, door_ki_lookup,		nomod_zero);
9077c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_upcall,			nomod_einval);
908323a81d9Sjwadams	WSTUB(doorfs, door_ki_upcall_limited,		nomod_einval);
9097c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_hold,			nomod_zero);
9107c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_rele,			nomod_zero);
9117c478bd9Sstevel@tonic-gate	WSTUB(doorfs, door_ki_info,			nomod_einval);
9127c478bd9Sstevel@tonic-gate	END_MODULE(doorfs);
9137c478bd9Sstevel@tonic-gate#endif
9147c478bd9Sstevel@tonic-gate
9157c478bd9Sstevel@tonic-gate/*
916753a6d45SSherry Moore * Stubs for MD5
917753a6d45SSherry Moore */
918753a6d45SSherry Moore#ifndef MD5_MODULE
919753a6d45SSherry Moore	MODULE(md5,misc);
920753a6d45SSherry Moore	WSTUB(md5, MD5Init,		nomod_zero);
921753a6d45SSherry Moore	WSTUB(md5, MD5Update,		nomod_zero);
922753a6d45SSherry Moore	WSTUB(md5, MD5Final,		nomod_zero);
923753a6d45SSherry Moore	END_MODULE(md5);
924753a6d45SSherry Moore#endif
925753a6d45SSherry Moore
926753a6d45SSherry Moore/*
927c5c4113dSnw141292 * Stubs for idmap
928c5c4113dSnw141292 */
929c5c4113dSnw141292#ifndef IDMAP_MODULE
930c5c4113dSnw141292	MODULE(idmap,misc);
931c5c4113dSnw141292	STUB(idmap, kidmap_batch_getgidbysid,	nomod_zero);
932c5c4113dSnw141292	STUB(idmap, kidmap_batch_getpidbysid,	nomod_zero);
933c5c4113dSnw141292	STUB(idmap, kidmap_batch_getsidbygid,	nomod_zero);
934c5c4113dSnw141292	STUB(idmap, kidmap_batch_getsidbyuid,	nomod_zero);
935c5c4113dSnw141292	STUB(idmap, kidmap_batch_getuidbysid,	nomod_zero);
936c5c4113dSnw141292	STUB(idmap, kidmap_get_create,		nomod_zero);
937c5c4113dSnw141292	STUB(idmap, kidmap_get_destroy,		nomod_zero);
938c5c4113dSnw141292	STUB(idmap, kidmap_get_mappings,	nomod_zero);
939c5c4113dSnw141292	STUB(idmap, kidmap_getgidbysid,		nomod_zero);
940c5c4113dSnw141292	STUB(idmap, kidmap_getpidbysid,		nomod_zero);
941c5c4113dSnw141292	STUB(idmap, kidmap_getsidbygid,		nomod_zero);
942c5c4113dSnw141292	STUB(idmap, kidmap_getsidbyuid,		nomod_zero);
943c5c4113dSnw141292	STUB(idmap, kidmap_getuidbysid,		nomod_zero);
944c5c4113dSnw141292	STUB(idmap, idmap_get_door,		nomod_einval);
945c5c4113dSnw141292	STUB(idmap, idmap_unreg_dh,		nomod_einval);
946c5c4113dSnw141292	STUB(idmap, idmap_reg_dh,		nomod_einval);
947bda89588Sjp151216	STUB(idmap, idmap_purge_cache,		nomod_einval);
948c5c4113dSnw141292	END_MODULE(idmap);
949c5c4113dSnw141292#endif
950c5c4113dSnw141292
951c5c4113dSnw141292/*
9527c478bd9Sstevel@tonic-gate * Stubs for auditing.
9537c478bd9Sstevel@tonic-gate */
9547c478bd9Sstevel@tonic-gate#ifndef C2AUDIT_MODULE
9557c478bd9Sstevel@tonic-gate	MODULE(c2audit,sys);
956005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, audit_init_module,	nomod_zero);
9577c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_start, 		nomod_zero);
9587c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_finish,		nomod_zero);
959005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, audit,			nomod_zero);
960005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, auditdoor,		nomod_zero);
9617c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_closef,		nomod_zero);
9627c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_core_start,	nomod_zero);
9637c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_core_finish,	nomod_zero);
9647c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strputmsg,	nomod_zero);
9657c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_savepath,		nomod_zero);
9667c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_anchorpath,	nomod_zero);
9677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exit,		nomod_zero);
9687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exec,		nomod_zero);
9697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_symlink,		nomod_zero);
9707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_symlink_create,	nomod_zero);
9717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_vncreate_start,	nomod_zero);
9727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_vncreate_finish,	nomod_zero);
9737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_enterprom,	nomod_zero);
9747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_exitprom,		nomod_zero);
9757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_chdirec,		nomod_zero);
9767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setf,		nomod_zero);
9777c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_sock,		nomod_zero);
9787c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_strgetmsg,	nomod_zero);
9797c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_ipc,		nomod_zero);
9807c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_ipcget,		nomod_zero);
9817c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_fdsend,		nomod_zero);
9827c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_fdrecv,		nomod_zero);
9837c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_priv,		nomod_zero);
9847c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setppriv,		nomod_zero);
9857c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_devpolicy,	nomod_zero);
9867c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_setfsat_path,	nomod_zero);
9877c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(c2audit, audit_cryptoadm,	nomod_zero);
988c28749e9Skais	NO_UNLOAD_STUB(c2audit, audit_kssl,		nomod_zero);
989799bd290Spwernau	NO_UNLOAD_STUB(c2audit, audit_pf_policy,	nomod_zero);
990005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_doormsg,		nomod_zero);
991005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_uwrite,		nomod_zero);
992005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_to_arg32,		nomod_zero);
993005d3febSMarek Pospisil	NO_UNLOAD_STUB(c2audit, au_free_rec,		nomod_zero);
9947c478bd9Sstevel@tonic-gate	END_MODULE(c2audit);
9957c478bd9Sstevel@tonic-gate#endif
9967c478bd9Sstevel@tonic-gate
9977c478bd9Sstevel@tonic-gate/*
9987c478bd9Sstevel@tonic-gate * Stubs for kernel rpc security service module
9997c478bd9Sstevel@tonic-gate */
10007c478bd9Sstevel@tonic-gate#ifndef RPCSEC_MODULE
10017c478bd9Sstevel@tonic-gate	MODULE(rpcsec,misc);
10027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_clnt_revoke,		nomod_zero);
10037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, authkern_create,		nomod_zero);
10047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_svc_msg,		nomod_zero);
10057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec, sec_svc_control,		nomod_zero);
10067c478bd9Sstevel@tonic-gate	END_MODULE(rpcsec);
10077c478bd9Sstevel@tonic-gate#endif
10087c478bd9Sstevel@tonic-gate
10097c478bd9Sstevel@tonic-gate/*
10107c478bd9Sstevel@tonic-gate * Stubs for rpc RPCSEC_GSS security service module
10117c478bd9Sstevel@tonic-gate */
10127c478bd9Sstevel@tonic-gate#ifndef RPCSEC_GSS_MODULE
10137c478bd9Sstevel@tonic-gate	MODULE(rpcsec_gss,misc);
10147c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, __svcrpcsec_gss,		nomod_zero);
10157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_getcred,		nomod_zero);
10167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_callback,	nomod_zero);
10177c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secget,		nomod_zero);
10187c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secfree,		nomod_zero);
10197c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_seccreate,		nomod_zero);
10207c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_defaults,	nomod_zero);
10217c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_revauth,		nomod_zero);
10227c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secpurge,		nomod_zero);
10237c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_cleanup,		nomod_zero);
10247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_versions,	nomod_zero);
10257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_max_data_length,	nomod_zero);
10267c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_svc_max_data_length,	nomod_zero);
10270a701b1eSRobert Gordon	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_service_type,	nomod_zero);
10287c478bd9Sstevel@tonic-gate	END_MODULE(rpcsec_gss);
10297c478bd9Sstevel@tonic-gate#endif
10307c478bd9Sstevel@tonic-gate
10317c478bd9Sstevel@tonic-gate/*
10327c478bd9Sstevel@tonic-gate * Stubs for PCI configurator module (misc/pcicfg).
10337c478bd9Sstevel@tonic-gate */
10347c478bd9Sstevel@tonic-gate#ifndef PCICFG_MODULE
10357c478bd9Sstevel@tonic-gate	MODULE(pcicfg,misc);
10367c478bd9Sstevel@tonic-gate	STUB(pcicfg, pcicfg_configure, 0);
10377c478bd9Sstevel@tonic-gate	STUB(pcicfg, pcicfg_unconfigure, 0);
10387c478bd9Sstevel@tonic-gate	END_MODULE(pcicfg);
10397c478bd9Sstevel@tonic-gate#endif
10407c478bd9Sstevel@tonic-gate
104170025d76Sjohnny/*
104226947304SEvan Yan * Stubs for pcieb nexus driver.
104370025d76Sjohnny */
104426947304SEvan Yan#ifndef PCIEB_MODULE
104526947304SEvan Yan	MODULE(pcieb,drv);
104626947304SEvan Yan	STUB(pcieb, pcieb_intel_error_workaround, 0);
104726947304SEvan Yan	END_MODULE(pcieb);
104870025d76Sjohnny#endif
104970025d76Sjohnny
10507c478bd9Sstevel@tonic-gate#ifndef IWSCN_MODULE
10517c478bd9Sstevel@tonic-gate	MODULE(iwscn,drv);
10527c478bd9Sstevel@tonic-gate	STUB(iwscn, srpop, 0);
10537c478bd9Sstevel@tonic-gate	END_MODULE(iwscn);
10547c478bd9Sstevel@tonic-gate#endif
10557c478bd9Sstevel@tonic-gate
10567c478bd9Sstevel@tonic-gate/*
10577c478bd9Sstevel@tonic-gate * Stubs for checkpoint-resume module
10587c478bd9Sstevel@tonic-gate */
10597c478bd9Sstevel@tonic-gate#ifndef CPR_MODULE
10607c478bd9Sstevel@tonic-gate        MODULE(cpr,misc);
10617c478bd9Sstevel@tonic-gate        STUB(cpr, cpr, 0);
10627c478bd9Sstevel@tonic-gate        END_MODULE(cpr);
10637c478bd9Sstevel@tonic-gate#endif
10647c478bd9Sstevel@tonic-gate
10657c478bd9Sstevel@tonic-gate/*
10667c478bd9Sstevel@tonic-gate * Stubs for kernel probes (tnf module).  Not unloadable.
10677c478bd9Sstevel@tonic-gate */
10687c478bd9Sstevel@tonic-gate#ifndef TNF_MODULE
10697c478bd9Sstevel@tonic-gate	MODULE(tnf,drv);
10707c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_ref32_1,	nomod_zero);
10717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_string_1,	nomod_zero);
10727c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_opaque_array_1,	nomod_zero);
10737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_struct_tag_1,	nomod_zero);
10747c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(tnf, tnf_allocate,	nomod_zero);
10757c478bd9Sstevel@tonic-gate	END_MODULE(tnf);
10767c478bd9Sstevel@tonic-gate#endif
10777c478bd9Sstevel@tonic-gate
10787c478bd9Sstevel@tonic-gate/*
107906bbe1e0Sedp * Stubs for i86hvm bootstraping
108006bbe1e0Sedp */
108106bbe1e0Sedp#ifndef HVM_BOOTSTRAP
108206bbe1e0Sedp	MODULE(hvm_bootstrap,misc);
108306bbe1e0Sedp	NO_UNLOAD_STUB(hvm_bootstrap, hvmboot_rootconf, nomod_zero);
108406bbe1e0Sedp	END_MODULE(hvm_bootstrap);
108506bbe1e0Sedp#endif
108606bbe1e0Sedp
108706bbe1e0Sedp/*
10887c478bd9Sstevel@tonic-gate * Clustering: stubs for bootstrapping.
10897c478bd9Sstevel@tonic-gate */
10907c478bd9Sstevel@tonic-gate#ifndef CL_BOOTSTRAP
10917c478bd9Sstevel@tonic-gate	MODULE(cl_bootstrap,misc);
10927c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_modload, nomod_minus_one);
10937c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_loadrootmodules, nomod_zero);
10947c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_rootconf, nomod_zero);
10957c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_mountroot, nomod_zero);
10967c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_init, nomod_zero);
10977c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_get_nodeid, nomod_zero);
10987c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_maximum_nodeid, nomod_zero);
10997c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(cl_bootstrap, cluster, nomod_zero);
11007c478bd9Sstevel@tonic-gate	END_MODULE(cl_bootstrap);
11017c478bd9Sstevel@tonic-gate#endif
11027c478bd9Sstevel@tonic-gate
11037c478bd9Sstevel@tonic-gate/*
11047c478bd9Sstevel@tonic-gate * Clustering: stubs for cluster infrastructure.
11057c478bd9Sstevel@tonic-gate */
11067c478bd9Sstevel@tonic-gate#ifndef CL_COMM_MODULE
11077c478bd9Sstevel@tonic-gate	MODULE(cl_comm,misc);
11087c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(cl_comm, cladmin, nomod_minus_one);
11097c478bd9Sstevel@tonic-gate	END_MODULE(cl_comm);
11107c478bd9Sstevel@tonic-gate#endif
11117c478bd9Sstevel@tonic-gate
11127c478bd9Sstevel@tonic-gate/*
11137c478bd9Sstevel@tonic-gate * Clustering: stubs for global file system operations.
11147c478bd9Sstevel@tonic-gate */
11157c478bd9Sstevel@tonic-gate#ifndef PXFS_MODULE
11167c478bd9Sstevel@tonic-gate	MODULE(pxfs,fs);
11177c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_read, nomod_zero);
11187c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_write, nomod_zero);
11197c478bd9Sstevel@tonic-gate	NO_UNLOAD_WSTUB(pxfs, cl_flk_state_transition_notify, nomod_zero);
11207c478bd9Sstevel@tonic-gate	END_MODULE(pxfs);
11217c478bd9Sstevel@tonic-gate#endif
11227c478bd9Sstevel@tonic-gate
11237c478bd9Sstevel@tonic-gate/*
11247c478bd9Sstevel@tonic-gate * Stubs for kernel cryptographic framework module (misc/kcf).
11257c478bd9Sstevel@tonic-gate */
11267c478bd9Sstevel@tonic-gate#ifndef KCF_MODULE
11277c478bd9Sstevel@tonic-gate	MODULE(kcf,misc);
11287c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mech2id, nomod_minus_one);
11297c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_register_provider, nomod_minus_one);
11307c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unregister_provider, nomod_minus_one);
11317c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_provider_notification, nomod_minus_one);
11327c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_op_notification, nomod_minus_one);
11337c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_kmflag, nomod_minus_one);
11347c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest, nomod_minus_one);
1135894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_prov, nomod_minus_one);
11367c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_init, nomod_minus_one);
1137894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_init_prov, nomod_minus_one);
11387c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_update, nomod_minus_one);
11397c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_digest_final, nomod_minus_one);
1140894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_digest_key_prov, nomod_minus_one);
11417c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt, nomod_minus_one);
1142894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_prov, nomod_minus_one);
11437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_init, nomod_minus_one);
1144894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_init_prov, nomod_minus_one);
11457c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_update, nomod_minus_one);
11467c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_final, nomod_minus_one);
11477c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt, nomod_minus_one);
1148894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_decrypt_prov, nomod_minus_one);
11497c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_init, nomod_minus_one);
1150894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_decrypt_init_prov, nomod_minus_one);
11517c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_update, nomod_minus_one);
11527c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_decrypt_final, nomod_minus_one);
11537c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_get_all_mech_info, nomod_minus_one);
1154894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_check, nomod_minus_one);
1155894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_check_prov, nomod_minus_one);
1156894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_derive, nomod_minus_one);
1157894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_generate, nomod_minus_one);
1158894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_generate_pair, nomod_minus_one);
1159894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_unwrap, nomod_minus_one);
1160894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_key_wrap, nomod_minus_one);
11617c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac, nomod_minus_one);
1162894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_prov, nomod_minus_one);
11637c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_verify, nomod_minus_one);
1164894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_verify_prov, nomod_minus_one);
11657c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_init, nomod_minus_one);
1166894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_init_prov, nomod_minus_one);
11677c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_update, nomod_minus_one);
11687c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_final, nomod_minus_one);
11697c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt, nomod_minus_one);
1170894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_prov, nomod_minus_one);
11717c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt, nomod_minus_one);
1172894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt_prov, nomod_minus_one);
11737c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init, nomod_minus_one);
1174894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init_prov, nomod_minus_one);
11757c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_update, nomod_minus_one);
11767c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_final, nomod_minus_one);
1177894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_copy, nomod_minus_one);
1178894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_create, nomod_minus_one);
1179894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_destroy, nomod_minus_one);
1180894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find_final, nomod_minus_one);
1181894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find_init, nomod_minus_one);
1182894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_find, nomod_minus_one);
1183894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_get_attribute_value, nomod_minus_one);
1184894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_get_size, nomod_minus_one);
1185894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_object_set_attribute_value, nomod_minus_one);
1186894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_close, nomod_minus_one);
1187894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_login, nomod_minus_one);
1188894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_logout, nomod_minus_one);
1189894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_session_open, nomod_minus_one);
11907c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac, nomod_minus_one);
1191894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_prov, nomod_minus_one);
11927c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init, nomod_minus_one);
1193894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init_prov, nomod_minus_one);
11947c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_update, nomod_minus_one);
11957c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_final, nomod_minus_one);
11967c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_create_ctx_template, nomod_minus_one);
11977c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_destroy_ctx_template, nomod_minus_one);
11987c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_get_mech_list, nomod_minus_one);
11997c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_free_mech_list, nomod_minus_one);
12007c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_cancel_req, nomod_minus_one);
12017c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_cancel_ctx, nomod_minus_one);
12027c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall_alloc, nomod_minus_one);
12037c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall_free, nomod_minus_one);
12047c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_bufcall, nomod_minus_one);
12057c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unbufcall, nomod_minus_one);
12067c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_notify_events, nomod_minus_one);
12077c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_unnotify_events, nomod_minus_one);
1208894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_get_provider, nomod_minus_one);
1209c892ebf1Skrishna	NO_UNLOAD_STUB(kcf, crypto_get_provinfo, nomod_minus_one);
1210894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_release_provider, nomod_minus_one);
12117c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign, nomod_minus_one);
1212894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_prov, nomod_minus_one);
12137c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_init, nomod_minus_one);
1214894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_init_prov, nomod_minus_one);
12157c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_update, nomod_minus_one);
12167c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_final, nomod_minus_one);
12177c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_sign_recover, nomod_minus_one);
1218894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_recover_prov, nomod_minus_one);
1219894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_sign_recover_init_prov, nomod_minus_one);
12207c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify, nomod_minus_one);
1221894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_prov, nomod_minus_one);
12227c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_init, nomod_minus_one);
1223894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_init_prov, nomod_minus_one);
12247c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_update, nomod_minus_one);
12257c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_final, nomod_minus_one);
12267c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, crypto_verify_recover, nomod_minus_one);
1227894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_recover_prov, nomod_minus_one);
1228894b2776Smcpowers	NO_UNLOAD_STUB(kcf, crypto_verify_recover_init_prov, nomod_minus_one);
12297c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_add_entropy, nomod_minus_one);
12303364c169SVladimir Kotal	NO_UNLOAD_STUB(kcf, random_add_pseudo_entropy, nomod_minus_one);
1231*9d12795fSRobert Mustacchi	NO_UNLOAD_STUB(kcf, random_get_blocking_bytes, nomod_minus_one);
12327c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_get_bytes, nomod_minus_one);
12337c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(kcf, random_get_pseudo_bytes, nomod_minus_one);
12347c478bd9Sstevel@tonic-gate	END_MODULE(kcf);
12357c478bd9Sstevel@tonic-gate#endif
12367c478bd9Sstevel@tonic-gate
12377c478bd9Sstevel@tonic-gate/*
12387c478bd9Sstevel@tonic-gate * Stubs for sha1. A non-unloadable module.
12397c478bd9Sstevel@tonic-gate */
12407c478bd9Sstevel@tonic-gate#ifndef SHA1_MODULE
12417c478bd9Sstevel@tonic-gate	MODULE(sha1,crypto);
12427c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Init, nomod_void);
12437c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Update, nomod_void);
12447c478bd9Sstevel@tonic-gate	NO_UNLOAD_STUB(sha1, SHA1Final, nomod_void);
12457c478bd9Sstevel@tonic-gate	END_MODULE(sha1);
12467c478bd9Sstevel@tonic-gate#endif
12477c478bd9Sstevel@tonic-gate
1248210db224Sericheng/*
1249210db224Sericheng * The following stubs are used by the mac module.
1250d62bc4baSyz147064 * Since dld already depends on mac, these
1251210db224Sericheng * stubs are needed to avoid circular dependencies.
1252210db224Sericheng */
12537c478bd9Sstevel@tonic-gate#ifndef	DLD_MODULE
12547c478bd9Sstevel@tonic-gate	MODULE(dld,drv);
1255210db224Sericheng	STUB(dld, dld_init_ops, nomod_void);
1256210db224Sericheng	STUB(dld, dld_fini_ops, nomod_void);
125761af1958SGarrett D'Amore	STUB(dld, dld_devt_to_instance, nomod_minus_one);
1258d62bc4baSyz147064	STUB(dld, dld_autopush, nomod_minus_one);
1259da14cebeSEric Cheng	STUB(dld, dld_ioc_register, nomod_einval);
1260da14cebeSEric Cheng	STUB(dld, dld_ioc_unregister, nomod_void);
12617c478bd9Sstevel@tonic-gate	END_MODULE(dld);
12627c478bd9Sstevel@tonic-gate#endif
12637c478bd9Sstevel@tonic-gate
1264c28749e9Skais/*
1265d62bc4baSyz147064 * The following stubs are used by the mac module.
1266d62bc4baSyz147064 * Since dls already depends on mac, these
1267d62bc4baSyz147064 * stubs are needed to avoid circular dependencies.
1268d62bc4baSyz147064 */
1269d62bc4baSyz147064#ifndef DLS_MODULE
1270d62bc4baSyz147064	MODULE(dls,misc);
1271d62bc4baSyz147064	STUB(dls, dls_devnet_mac, nomod_zero);
1272d62bc4baSyz147064	STUB(dls, dls_devnet_hold_tmp, nomod_einval);
1273d62bc4baSyz147064	STUB(dls, dls_devnet_rele_tmp, nomod_void);
1274da14cebeSEric Cheng	STUB(dls, dls_devnet_hold_link, nomod_einval);
1275da14cebeSEric Cheng	STUB(dls, dls_devnet_rele_link, nomod_void);
127630890389Sartem	STUB(dls, dls_devnet_prop_task_wait, nomod_void);
1277d62bc4baSyz147064	STUB(dls, dls_mgmt_get_linkid, nomod_einval);
1278da14cebeSEric Cheng	STUB(dls, dls_devnet_macname2linkid, nomod_einval);
1279da14cebeSEric Cheng	STUB(dls, dls_mgmt_get_linkinfo, nomod_einval);
1280d62bc4baSyz147064        END_MODULE(dls);
1281d62bc4baSyz147064#endif
1282d62bc4baSyz147064
1283d62bc4baSyz147064#ifndef	SOFTMAC_MODULE
1284d62bc4baSyz147064	MODULE(softmac,drv);
1285d62bc4baSyz147064	STUB(softmac, softmac_hold_device, nomod_einval);
1286d62bc4baSyz147064	STUB(softmac, softmac_rele_device, nomod_void);
1287d62bc4baSyz147064	STUB(softmac, softmac_recreate, nomod_void);
1288d62bc4baSyz147064	END_MODULE(softmac);
1289d62bc4baSyz147064#endif
1290d62bc4baSyz147064
12912b24ab6bSSebastien Roy#ifndef IPTUN_MODULE
12922b24ab6bSSebastien Roy	MODULE(iptun,drv);
12932b24ab6bSSebastien Roy	STUB(iptun, iptun_create, nomod_einval);
12942b24ab6bSSebastien Roy	STUB(iptun, iptun_delete, nomod_einval);
12952b24ab6bSSebastien Roy	STUB(iptun, iptun_set_policy, nomod_void) ;
12962b24ab6bSSebastien Roy	END_MODULE(iptun);
12972b24ab6bSSebastien Roy#endif
12982b24ab6bSSebastien Roy
1299d62bc4baSyz147064/*
130017169044Sbrutus * Stubs for dcopy, for Intel IOAT KAPIs
130117169044Sbrutus */
130217169044Sbrutus#ifndef DCOPY_MODULE
130317169044Sbrutus	MODULE(dcopy,misc);
130417169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_query, nomod_minus_one);
130517169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_query_channel, nomod_minus_one);
130617169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_alloc, nomod_minus_one);
130717169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_free, nomod_minus_one);
130817169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_alloc, nomod_minus_one);
130917169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_free, nomod_void);
131017169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_post, nomod_minus_one);
131117169044Sbrutus	NO_UNLOAD_STUB(dcopy, dcopy_cmd_poll, nomod_minus_one);
131217169044Sbrutus	END_MODULE(dcopy);
131317169044Sbrutus#endif
131417169044Sbrutus
13150e751525SEric Saxe/*
13160e751525SEric Saxe * Stubs for acpica
13170e751525SEric Saxe */
13180e751525SEric Saxe#ifndef ACPICA_MODULE
13190e751525SEric Saxe	MODULE(acpica,misc);
13200e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiOsReadPort, nomod_minus_one) ;
13210e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiOsWritePort, nomod_minus_one) ;
13220e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiInstallNotifyHandler, nomod_minus_one) ;
13230e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiRemoveNotifyHandler, nomod_minus_one) ;
13240e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiEvaluateObject, nomod_minus_one) ;
13250e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiEvaluateObjectTyped, nomod_minus_one) ;
1326aa2aa9a6SDana Myers	NO_UNLOAD_STUB(acpica, AcpiWriteBitRegister, nomod_minus_one) ;
1327aa2aa9a6SDana Myers	NO_UNLOAD_STUB(acpica, AcpiReadBitRegister, nomod_minus_one) ;
13280e751525SEric Saxe	NO_UNLOAD_STUB(acpica, AcpiOsFree, nomod_minus_one) ;
13290e751525SEric Saxe	NO_UNLOAD_STUB(acpica, acpica_get_handle_cpu, nomod_minus_one) ;
13300e751525SEric Saxe	NO_UNLOAD_STUB(acpica, acpica_get_global_FADT, nomod_minus_one) ;
133178d5422cSMark Haywood	NO_UNLOAD_STUB(acpica, acpica_write_cpupm_capabilities,
133278d5422cSMark Haywood	    nomod_minus_one)		       ;
13330e751525SEric Saxe	NO_UNLOAD_STUB(acpica, __acpi_wbinvd, nomod_minus_one) ;
13344cf02d40SSaurabh Misra	NO_UNLOAD_STUB(acpica, acpi_reset_system, nomod_minus_one) ;
13350e751525SEric Saxe	END_MODULE(acpica);
13360e751525SEric Saxe#endif
13370e751525SEric Saxe
1338a3114836SGerry Liu/*
1339a3114836SGerry Liu * Stubs for acpidev
1340a3114836SGerry Liu */
1341a3114836SGerry Liu#ifndef ACPIDEV_MODULE
1342a3114836SGerry Liu	MODULE(acpidev,misc);
1343a3114836SGerry Liu	NO_UNLOAD_STUB(acpidev, acpidev_dr_get_cpu_numa_info, nomod_minus_one) ;
1344a3114836SGerry Liu	NO_UNLOAD_STUB(acpidev, acpidev_dr_free_cpu_numa_info,
1345a3114836SGerry Liu	    nomod_minus_one) ;
1346a3114836SGerry Liu	END_MODULE(acpidev);
1347a3114836SGerry Liu#endif
1348a3114836SGerry Liu
1349b127ac41SPhilip Kirk#ifndef IPNET_MODULE
1350b127ac41SPhilip Kirk	MODULE(ipnet,drv);
1351b127ac41SPhilip Kirk	STUB(ipnet, ipnet_if_getdev, nomod_zero);
1352b127ac41SPhilip Kirk	STUB(ipnet, ipnet_walk_if, nomod_zero);
1353b127ac41SPhilip Kirk	END_MODULE(ipnet);
1354b127ac41SPhilip Kirk#endif
1355b127ac41SPhilip Kirk
135609011d40SVikram Hegde#ifndef IOMMULIB_MODULE
135709011d40SVikram Hegde	MODULE(iommulib,misc);
135809011d40SVikram Hegde	STUB(iommulib, iommulib_nex_close, nomod_void);
135909011d40SVikram Hegde        END_MODULE(iommulib);
136009011d40SVikram Hegde#endif
136109011d40SVikram Hegde
13620f1702c5SYu Xiangning/*
13633a634bfcSVikram Hegde * Stubs for rootnex nexus driver.
13643a634bfcSVikram Hegde */
13653a634bfcSVikram Hegde#ifndef ROOTNEX_MODULE
13663a634bfcSVikram Hegde	MODULE(rootnex,drv);
13673a634bfcSVikram Hegde	STUB(rootnex, immu_init, 0);
13683a634bfcSVikram Hegde	STUB(rootnex, immu_startup, 0);
13693a634bfcSVikram Hegde	STUB(rootnex, immu_physmem_update, 0);
13703a634bfcSVikram Hegde	END_MODULE(rootnex);
13713a634bfcSVikram Hegde#endif
13723a634bfcSVikram Hegde
13733a634bfcSVikram Hegde/*
13740f1702c5SYu Xiangning * Stubs for kernel socket, for iscsi
13750f1702c5SYu Xiangning */
13760f1702c5SYu Xiangning#ifndef KSOCKET_MODULE
13770f1702c5SYu Xiangning	MODULE(ksocket, misc);
13780f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_setsockopt, nomod_minus_one);
13790f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_getsockopt, nomod_minus_one);
13800f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_getpeername, nomod_minus_one);
13810f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_getsockname, nomod_minus_one);
13820f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_socket, nomod_minus_one);
13830f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_bind, nomod_minus_one);
13840f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_listen, nomod_minus_one);
13850f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_accept, nomod_minus_one);
13860f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_connect, nomod_minus_one);
13870f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_recv, nomod_minus_one);
13880f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_recvfrom, nomod_minus_one);
13890f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_recvmsg, nomod_minus_one);
13900f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_send, nomod_minus_one);
13910f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_sendto, nomod_minus_one);
13920f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_sendmsg, nomod_minus_one);
13930f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_ioctl, nomod_minus_one);
13940f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_setcallbacks, nomod_minus_one);
13950f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_hold, nomod_minus_one);
13960f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_rele, nomod_minus_one);
13970f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_shutdown, nomod_minus_one);
13980f1702c5SYu Xiangning	NO_UNLOAD_STUB(ksocket, ksocket_close, nomod_minus_one);
13990f1702c5SYu Xiangning	END_MODULE(ksocket);
14000f1702c5SYu Xiangning#endif
14010f1702c5SYu Xiangning
140280e2ca85S/*
140380e2ca85S * Stubs for elfexec
140480e2ca85S */
140580e2ca85S#ifndef ELFEXEC_MODULE
140680e2ca85S	MODULE(elfexec,exec);
140780e2ca85S	STUB(elfexec, elfexec,      	nomod_einval);
140880e2ca85S	STUB(elfexec, mapexec_brand,	nomod_einval);
140987aac450SGerald Jelinek#if defined(__amd64)
141087aac450SGerald Jelinek	STUB(elfexec, elf32exec,	nomod_einval);
141180e2ca85S	STUB(elfexec, mapexec32_brand,	nomod_einval);
141287aac450SGerald Jelinek#endif
141380e2ca85S	END_MODULE(elfexec);
141480e2ca85S#endif
141580e2ca85S
14167ff178cdSJimmy Vetayases/*
14177ff178cdSJimmy Vetayases * Stub(s) for APIX module.
14187ff178cdSJimmy Vetayases */
14197ff178cdSJimmy Vetayases#ifndef APIX_MODULE
14207ff178cdSJimmy Vetayases	MODULE(apix,mach);
14217ff178cdSJimmy Vetayases	WSTUB(apix, apix_loaded, nomod_zero);
14227ff178cdSJimmy Vetayases	END_MODULE(apix);
14237ff178cdSJimmy Vetayases#endif
14247ff178cdSJimmy Vetayases
14257c478bd9Sstevel@tonic-gate/ this is just a marker for the area of text that contains stubs
14267c478bd9Sstevel@tonic-gate
14277c478bd9Sstevel@tonic-gate	ENTRY_NP(stubs_end)
14287c478bd9Sstevel@tonic-gate	nop
14297c478bd9Sstevel@tonic-gate
14307c478bd9Sstevel@tonic-gate#endif	/* lint */
1431