summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-11-04 13:30:00 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-11-04 13:30:00 +0000
commitd65c836ab5fb3347c6995469886bff9cb74472b4 (patch)
treeeb29bb54284535753d397986b56c8baef2fb26b5
parente12989ccc735decb633d083444ce87052cb05bad (diff)
parent5e8da2b9e1f3fba257c0c163a81a375107b9ee64 (diff)
downloadillumos-joyent-d65c836ab5fb3347c6995469886bff9cb74472b4.tar.gz
[illumos-gate merge]
commit faeaba889049371f163f3deb6efd690dbc986e3d 11823 Add HMAC_SHA1 crypto tests commit c00e8e9ee0eb7384f171971ad938063426b731f7 11870 cleanup sys/ddi_implfuncs.h commit 65bac82b14db6446c8bfb4ddb4c2faee8feddc58 11904 Add quick/make-nfs commit a73ed278e8e65ae8780cbb2efbcb6ed43e0f3c69 11895 libumem: umem_error_buffer is gone Conflicts: usr/src/test/crypto-tests/tests/hmac/main.c usr/src/test/crypto-tests/cmd/kcf/Makefile
-rw-r--r--usr/src/lib/libumem/common/misc.c6
-rw-r--r--usr/src/test/crypto-tests/cmd/kcf/Makefile1
-rwxr-xr-xusr/src/tools/quick/make-nfs332
-rw-r--r--usr/src/uts/common/sys/ddi_implfuncs.h270
4 files changed, 443 insertions, 166 deletions
diff --git a/usr/src/lib/libumem/common/misc.c b/usr/src/lib/libumem/common/misc.c
index 6d809e19e0..b8c3847fa6 100644
--- a/usr/src/lib/libumem/common/misc.c
+++ b/usr/src/lib/libumem/common/misc.c
@@ -49,9 +49,9 @@
static mutex_t umem_error_lock = DEFAULTMUTEX;
-static char umem_error_buffer[ERR_SIZE] = "";
-static uint_t umem_error_begin = 0;
-static uint_t umem_error_end = 0;
+char umem_error_buffer[ERR_SIZE] = "";
+uint_t umem_error_begin = 0;
+uint_t umem_error_end = 0;
#define WRITE_AND_INC(var, value) { \
umem_error_buffer[(var)++] = (value); \
diff --git a/usr/src/test/crypto-tests/cmd/kcf/Makefile b/usr/src/test/crypto-tests/cmd/kcf/Makefile
index 8ae7c35786..8681cbd647 100644
--- a/usr/src/test/crypto-tests/cmd/kcf/Makefile
+++ b/usr/src/test/crypto-tests/cmd/kcf/Makefile
@@ -49,4 +49,3 @@ $(ROOTDIGEST)/%: %.ksh
$(INS.rename)
$(ROOTHMAC)/%: %.ksh
$(INS.rename)
-
diff --git a/usr/src/tools/quick/make-nfs b/usr/src/tools/quick/make-nfs
new file mode 100755
index 0000000000..7c0caf6c0b
--- /dev/null
+++ b/usr/src/tools/quick/make-nfs
@@ -0,0 +1,332 @@
+#!/bin/ksh
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019 Nexenta by DDN, Inc. All rights reserved.
+#
+
+# Use normal make (not dmake) by default.
+make=${MAKE:-make}
+
+# Set this if you want to use dbx or gdb:
+# export SOURCEDEBUG=yes
+
+[ -n "$SRC" ] || {
+ echo "SRC not set. Run 'ws' or 'bldenv' first."
+ exit 1
+}
+
+cpu=`uname -p`
+case $cpu in
+i386)
+ x=intel
+ kmdb_arch="amd64"
+ mdb_arch="ia32 amd64"
+ arch64=amd64
+ ;;
+sparc)
+ x=sparc
+ kmdb_arch=v9
+ mdb_arch="v7 v9"
+ arch64=sparcv9
+ ;;
+*) echo "Unknown architecture" ; exit 1;;
+esac
+
+################################################################
+
+build_tools() {
+ test -f $SRC/tools/proto/root_i386-nd/opt/onbld/bin/genoffsets ||
+ (cd $SRC/tools && $make install)
+ (cd $SRC/common/mapfiles; $make install)
+}
+
+clobber_tools() {
+ (cd $SRC/tools && $make clobber)
+ (cd $SRC/common/mapfiles; $make clobber)
+}
+
+# end build_tools()
+
+
+################################################################
+
+do_hdrs() {
+
+targ=$1
+if [ "$targ" = clobber ]
+then
+ (cd $SRC/uts && $make -k clobber_h)
+ (cd $SRC/head && $make clobber)
+fi
+
+if [ "$targ" = install ]
+then
+ targ=install_h
+
+ # Just the parts of "make sgs" we need, and
+ # skip them if they appear to be done.
+ # ... stuff under $SRC
+ test -f $SRC/uts/common/sys/priv_names.h ||
+ (cd $SRC/uts && $make -k all_h)
+
+ test -f $SRC/head/rpcsvc/nispasswd.h ||
+ (cd $SRC/head && $make -k $targ)
+
+ # ... stuff under $ROOT (proto area)
+ test -d $ROOT/usr/include/sys ||
+ (cd $SRC && $make rootdirs)
+ test -f $ROOT/usr/include/sys/types.h ||
+ (cd $SRC/uts && $make -k $targ)
+ test -f $ROOT/usr/include/rpcsvc/daemon_utils.h ||
+ (cd $SRC/head && $make $targ)
+
+ # always update the NFS (kernel) headers to be safe
+ (cd $SRC/uts/common/gssapi && $make -k $targ)
+ (cd $SRC/uts/common/sys && $make -k $targ)
+ (cd $SRC/uts/common/nfs && $make -k $targ)
+fi
+
+# Need some library headers too...
+for lib in \
+ libcmdutils \
+ libcryptoutil \
+ libidmap \
+ libpam \
+ libsec \
+ libzfs_core \
+ libzfs \
+ libshare \
+ libuutil \
+ librpcsvc \
+ libmapid
+do
+ (cd $SRC/lib/$lib && $make $targ)
+done
+}
+
+# end do_hdrs()
+
+
+################################################################
+
+do_kern() {
+ case $1 in
+ *) targ=$1 ;;
+ esac
+ ( unset SOURCEDEBUG ;
+ (cd $SRC/uts/$x/nfs && $make $targ) ;
+ (cd $SRC/uts/$x/nfs_dlboot && $make $targ) ;
+ (cd $SRC/uts/$x/nfssrv && $make $targ) ;
+ (cd $SRC/uts/$x/klmmod && $make $targ) ;
+ (cd $SRC/uts/$x/klmops && $make $targ) )
+}
+
+# end do_kern()
+
+
+################################################################
+
+# Note lib1 builds prerequisite libraries not delivered by the
+# tar file we create below. To accelerate clean/install, we
+# skip these on clean (but still nuke them for clobber)
+
+do_lib1() {
+
+for lib in \
+ libavl \
+ libuutil \
+ libcmdutils \
+ libidmap \
+ libzfs_core \
+ libzfs
+do
+ (cd $SRC/lib/$lib && $make $1)
+done
+}
+
+# lib2 builds stuff we include in the tar file,
+# or that we don't mind rebuilding after clean.
+
+do_lib2() {
+
+for lib in \
+ librpcsvc \
+ libmapid
+do
+ (cd $SRC/lib/$lib && $make $1)
+done
+
+(cd $SRC/lib/libshare && $make $1 PLUGINS=nfs)
+
+}
+
+# end do_lib1() and do_lib2()
+
+
+################################################################
+
+do_cmds() {
+
+case $1 in
+install)
+ # mount programs need fslib.o
+ (cd $SRC/cmd/fs.d && $make fslib.o)
+ (cd $SRC/cmd/fs.d/nfs && $make $1 catalog)
+ ;;
+clean|clobber)
+ (cd $SRC/cmd/fs.d/nfs && $make $1)
+ (cd $SRC/cmd/fs.d && $make ${1}_local)
+ ;;
+esac
+
+
+}
+
+# Build the MDB modules, WITH the linktest
+# Not yet. See https://www.illumos.org/issues/3409
+
+# end do_cmds()
+
+
+################################################################
+# This builds $SRC/TAGS (and cscope.files) in a helpful order.
+
+do_tags() {
+ (cd $SRC ;
+ find uts/common/sys -name '*.[ch]' -print |sort
+ find uts/common/net -name '*.[ch]' -print |sort
+ find uts/common/netinet -name '*.[ch]' -print |sort
+ find uts/common/nfs -name '*.[ch]' -print |sort
+ find uts/common/rpc -name '*.[ch]' -print |sort
+ find uts/common/klm -name '*.[ch]' -print |sort
+ find uts/common/fs/nfs -name '*.[ch]' -print |sort
+ find uts/common/gssapi -name '*.[ch]' -print |sort
+ find head -name '*.h' -print |sort
+ find cmd/fs.d/nfs -name '*.[ch]' -print |sort
+ ) > $SRC/cscope.files
+
+ (cd $SRC ;
+ exctags -e --langmap=c:+.ndl -h ndl -L - < cscope.files
+ cscope -b )
+}
+
+#end do_tags()
+
+
+################################################################
+# This creates tarfiles one can use to update a test machine.
+
+do_tar() {
+ git_rev=`git rev-parse --short=8 HEAD`
+
+# NFS (everything)
+ files="
+kernel/misc/$arch64/klmmod
+kernel/misc/$arch64/klmops
+kernel/misc/$arch64/nfs_dlboot
+kernel/misc/$arch64/nfssrv
+kernel/fs/$arch64/nfs
+kernel/sys/$arch64/nfs
+lib/svc/manifest/network/nfs/cbd.xml
+lib/svc/manifest/network/nfs/client.xml
+lib/svc/manifest/network/nfs/mapid.xml
+lib/svc/manifest/network/nfs/nfslogd.xml
+lib/svc/manifest/network/nfs/nlockmgr.xml
+lib/svc/manifest/network/nfs/rquota.xml
+lib/svc/manifest/network/nfs/server.xml
+lib/svc/manifest/network/nfs/status.xml
+lib/svc/method/nfs-client
+lib/svc/method/nfs-server
+lib/svc/method/nlockmgr
+usr/bin/nfsstat
+usr/lib/fs/nfs/$arch64/libshare_nfs.so.1
+usr/lib/fs/nfs/libshare_nfs.so.1
+usr/lib/fs/nfs/dfmounts
+usr/lib/fs/nfs/dfshares
+usr/lib/fs/nfs/nfsfind
+usr/lib/fs/nfs/showmount
+usr/lib/fs/nfs/umount
+usr/lib/nfs/libmapid.so.1
+usr/lib/nfs/lockd
+usr/lib/nfs/mountd
+usr/lib/nfs/nfs4cbd
+usr/lib/nfs/nfsd
+usr/lib/nfs/nfslogd
+usr/lib/nfs/nfsmapid
+usr/lib/nfs/rquotad
+usr/lib/nfs/statd
+usr/lib/reparse/$arch64/libnfs_basic.so.1
+usr/lib/reparse/libnfs_basic.so.1
+usr/sbin/clear_locks
+usr/sbin/exportfs
+usr/sbin/nfsref
+"
+ (cd $ROOT && tar cfj ../../nfs-${git_rev}.tar.bz2 $files)
+
+# KLM kmod
+ files="
+kernel/misc/$arch64/klmmod
+kernel/misc/$arch64/klmops
+"
+ (cd $ROOT && tar cfj ../../klm-${git_rev}.tar.bz2 $files)
+}
+
+# end do_tar()
+
+
+################################################################
+
+if [ "$1" = "" ]; then
+ set '?' # force usage
+fi
+
+set -x
+
+for arg
+do
+ case "$arg" in
+ install)
+ build_tools
+ set -e
+ do_hdrs $arg
+ do_kern $arg
+ do_lib1 $arg
+ do_lib2 $arg
+ do_cmds $arg
+ ;;
+ clean)
+ # intentionally skip: lib1, hdrs, tools
+ do_cmds $arg
+ do_lib2 $arg
+ do_kern $arg
+ ;;
+ clobber)
+ do_cmds $arg
+ do_lib2 $arg
+ do_lib1 $arg
+ do_kern $arg
+ do_hdrs $arg
+ clobber_tools
+ ;;
+ tags)
+ do_tags
+ ;;
+ tar)
+ do_tar
+ ;;
+ *)
+ echo "Usage: $0 {install|clean|clobber|tags|tar}";
+ exit 1;
+ ;;
+ esac
+done
diff --git a/usr/src/uts/common/sys/ddi_implfuncs.h b/usr/src/uts/common/sys/ddi_implfuncs.h
index 23413cffef..e7d218844b 100644
--- a/usr/src/uts/common/sys/ddi_implfuncs.h
+++ b/usr/src/uts/common/sys/ddi_implfuncs.h
@@ -43,169 +43,113 @@ extern "C" {
#ifdef _KERNEL
/*
- * Declare implementation functions that sunddi functions can
- * call in order to perform their required task. Each kernel
- * architecture must provide them.
+ * Declare implementation functions that sunddi functions can call in order to
+ * perform their required task. Each kernel architecture must provide them.
*/
-
-int
-i_ddi_bus_map(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp,
- off_t offset, off_t len, caddr_t *vaddrp);
-
-int
-i_ddi_apply_range(dev_info_t *dip, dev_info_t *rdip, struct regspec *rp);
-
-struct regspec *
-i_ddi_rnumber_to_regspec(dev_info_t *dip, int rnumber);
-
-
-int
-i_ddi_map_fault(dev_info_t *dip, dev_info_t *rdip,
- struct hat *hat, struct seg *seg, caddr_t addr,
- struct devpage *dp, pfn_t pfn, uint_t prot, uint_t lock);
-
-ddi_regspec_t
-i_ddi_get_regspec(dev_info_t *dip, dev_info_t *rdip, uint_t rnumber,
- off_t offset, off_t len);
+extern int i_ddi_bus_map(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp,
+ off_t offset, off_t len, caddr_t *vaddrp);
+extern int i_ddi_apply_range(dev_info_t *dip, dev_info_t *rdip,
+ struct regspec *rp);
+extern struct regspec *i_ddi_rnumber_to_regspec(dev_info_t *dip, int rnumber);
+extern int i_ddi_map_fault(dev_info_t *dip, dev_info_t *rdip,
+ struct hat *hat, struct seg *seg, caddr_t addr,
+ struct devpage *dp, pfn_t pfn, uint_t prot, uint_t lock);
/*
- * Implementation specific memory allocation and de-allocation routines.
+ * Implementation-specific memory allocation and de-allocation routines
*/
-int
-i_ddi_mem_alloc(dev_info_t *dip, ddi_dma_attr_t *attributes,
- size_t length, int cansleep, int streaming,
- ddi_device_acc_attr_t *accattrp, caddr_t *kaddrp,
- size_t *real_length, ddi_acc_hdl_t *handlep);
-
-void
-i_ddi_mem_free(caddr_t kaddr, ddi_acc_hdl_t *ap);
+extern int i_ddi_mem_alloc(dev_info_t *dip, ddi_dma_attr_t *attributes,
+ size_t length, int cansleep, int streaming,
+ ddi_device_acc_attr_t *accattrp, caddr_t *kaddrp,
+ size_t *real_length, ddi_acc_hdl_t *handlep);
+extern void i_ddi_mem_free(caddr_t kaddr, ddi_acc_hdl_t *ap);
-int
-i_ddi_devi_get_ppa(dev_info_t *dip);
+extern int i_ddi_devi_get_ppa(dev_info_t *);
+extern void i_ddi_devi_set_ppa(dev_info_t *, int);
-void
-i_ddi_devi_set_ppa(dev_info_t *dip, int ppa);
-
-void
-i_ddi_devacc_to_hatacc(ddi_device_acc_attr_t *devaccp, uint_t *hataccp);
-
-void
-i_ddi_cacheattr_to_hatacc(uint_t flags, uint_t *hataccp);
-
-boolean_t
-i_ddi_check_cache_attr(uint_t flags);
+extern void i_ddi_devacc_to_hatacc(ddi_device_acc_attr_t *devaccp,
+ uint_t *hataccp);
+extern void i_ddi_cacheattr_to_hatacc(uint_t flags, uint_t *hataccp);
+extern boolean_t i_ddi_check_cache_attr(uint_t flags);
/*
* Access and DMA handle fault set/clear routines
*/
-void
-i_ddi_acc_set_fault(ddi_acc_handle_t handle);
-void
-i_ddi_acc_clr_fault(ddi_acc_handle_t handle);
-void
-i_ddi_dma_set_fault(ddi_dma_handle_t handle);
-void
-i_ddi_dma_clr_fault(ddi_dma_handle_t handle);
+extern void i_ddi_acc_set_fault(ddi_acc_handle_t handle);
+extern void i_ddi_acc_clr_fault(ddi_acc_handle_t handle);
+extern void i_ddi_dma_set_fault(ddi_dma_handle_t handle);
+extern void i_ddi_dma_clr_fault(ddi_dma_handle_t handle);
/*
- * Event-handling functions for rootnex
- * These provide the standard implementation of fault handling
+ * Event-handling functions for rootnex.
+ * These provide the standard implementation of fault handling.
*/
-void
-i_ddi_rootnex_init_events(dev_info_t *dip);
-
-int
-i_ddi_rootnex_get_eventcookie(dev_info_t *dip, dev_info_t *rdip,
- char *eventname, ddi_eventcookie_t *cookiep);
-int
-i_ddi_rootnex_add_eventcall(dev_info_t *dip, dev_info_t *rdip,
- ddi_eventcookie_t eventid, void (*handler)(dev_info_t *dip,
- ddi_eventcookie_t event, void *arg, void *impl_data), void *arg,
- ddi_callback_id_t *cb_id);
-int
-i_ddi_rootnex_remove_eventcall(dev_info_t *devi, ddi_callback_id_t cb_id);
-
-int
-i_ddi_rootnex_post_event(dev_info_t *dip, dev_info_t *rdip,
- ddi_eventcookie_t eventid, void *impl_data);
-
-/*
- * Clustering: Return the global devices path base, or
- * the entire global devices path prefix.
- */
-const char *
-i_ddi_get_dpath_base();
-
-const char *
-i_ddi_get_dpath_prefix();
+extern void i_ddi_rootnex_init_events(dev_info_t *);
+extern int i_ddi_rootnex_get_eventcookie(dev_info_t *, dev_info_t *, char *,
+ ddi_eventcookie_t *);
+extern int i_ddi_rootnex_add_eventcall(dev_info_t *, dev_info_t *,
+ ddi_eventcookie_t, void (*)(dev_info_t *, ddi_eventcookie_t, void *,
+ void *), void *, ddi_callback_id_t *);
+extern int i_ddi_rootnex_remove_eventcall(dev_info_t *, ddi_callback_id_t);
+extern int i_ddi_rootnex_post_event(dev_info_t *, dev_info_t *,
+ ddi_eventcookie_t, void *);
/*
* Search and return properties from the PROM
*/
-int
-impl_ddi_bus_prop_op(dev_t dev, dev_info_t *dip,
- dev_info_t *ch_dip, ddi_prop_op_t prop_op, int mod_flags,
- char *name, caddr_t valuep, int *lengthp);
+extern int impl_ddi_bus_prop_op(dev_t, dev_info_t *, dev_info_t *,
+ ddi_prop_op_t, int, char *, caddr_t, int *);
/*
* Copy an integer from PROM to native machine representation
*/
-int
-impl_ddi_prop_int_from_prom(uchar_t *intp, int n);
-
+extern int impl_ddi_prop_int_from_prom(uchar_t *intp, int n);
extern int impl_ddi_sunbus_initchild(dev_info_t *);
extern void impl_ddi_sunbus_removechild(dev_info_t *);
/*
- * Implementation specific access handle allocator and init. routines
+ * Implementation-specific access handle allocator and init. routines
*/
extern ddi_acc_handle_t impl_acc_hdl_alloc(int (*waitfp)(caddr_t),
- caddr_t arg);
+ caddr_t arg);
extern void impl_acc_hdl_free(ddi_acc_handle_t handle);
-
extern ddi_acc_hdl_t *impl_acc_hdl_get(ddi_acc_handle_t handle);
extern void impl_acc_hdl_init(ddi_acc_hdl_t *hp);
-/* access error handling support */
+/*
+ * Access error handling support
+ */
extern void impl_acc_err_init(ddi_acc_hdl_t *);
extern int impl_dma_check(dev_info_t *, const void *, const void *,
const void *);
extern int i_ddi_ontrap(ddi_acc_handle_t);
extern void i_ddi_notrap(ddi_acc_handle_t);
-extern int i_ddi_prot_trampoline();
-extern int i_ddi_caut_trampoline();
+extern int i_ddi_prot_trampoline(void);
+extern int i_ddi_caut_trampoline(void);
/*
* misc/bootdev entry points - these are private routines and subject
- * to change.
+ * to change
*/
-extern int
-i_devname_to_promname(char *dev_name, char *ret_buf, size_t);
-
-extern int
-i_promname_to_devname(char *prom_name, char *ret_buf);
-
-extern char *
-i_convert_boot_device_name(char *, char *, size_t *);
+extern int i_devname_to_promname(char *dev_name, char *ret_buf, size_t);
+extern int i_promname_to_devname(char *prom_name, char *ret_buf);
+extern char *i_convert_boot_device_name(char *, char *, size_t *);
/*
- * Nodeid management ...
+ * Nodeid management
*/
-void impl_ddi_init_nodeid(void);
-int impl_ddi_alloc_nodeid(int *nodeid);
-int impl_ddi_take_nodeid(int nodeid, int kmflag);
-void impl_ddi_free_nodeid(int nodeid);
+extern void impl_ddi_init_nodeid(void);
+extern int impl_ddi_alloc_nodeid(int *);
+extern int impl_ddi_take_nodeid(int, int);
+extern void impl_ddi_free_nodeid(int);
/*
* minorname/devtspectype conversions
*/
-extern char *
-i_ddi_devtspectype_to_minorname(dev_info_t *dip, dev_t dev, int spec_type);
-
-extern int
-i_ddi_minorname_to_devtspectype(dev_info_t *dip, char *minor_name,
- dev_t *devp, int *spectypep);
+extern char *i_ddi_devtspectype_to_minorname(dev_info_t *, dev_t, int);
+extern int i_ddi_minorname_to_devtspectype(dev_info_t *, char *, dev_t *,
+ int *);
/*
* Routines in ddi_v9_asm.s
@@ -219,69 +163,71 @@ extern int peekpoke_mem(ddi_ctl_enum_t, peekpoke_ctlops_t *);
/*
* Helper functions
*/
-char *i_ddi_strdup(char *, uint_t);
-void i_ddi_prop_list_delete(ddi_prop_t *);
-ddi_prop_t *i_ddi_prop_list_dup(ddi_prop_t *, uint_t);
-int i_ddi_load_drvconf(major_t);
-int i_ddi_unload_drvconf(major_t);
-ddi_node_state_t i_ddi_node_state(dev_info_t *);
-int i_ddi_devi_attached(dev_info_t *);
-void i_ddi_parse_name(char *, char **, char **, char **);
-void i_ddi_set_node_state(dev_info_t *, ddi_node_state_t);
-int i_ddi_detach_installed_driver(major_t, int);
-void i_ddi_set_binding_name(dev_info_t *, char *);
-void i_ddi_bind_devs();
-int i_ddi_unbind_devs_by_alias(major_t, char *);
-void i_ddi_unbind_devs(major_t);
-ddi_prop_list_t *i_ddi_prop_list_create(ddi_prop_t *);
+extern char *i_ddi_strdup(char *, uint_t);
+extern void i_ddi_prop_list_delete(ddi_prop_t *);
+extern ddi_prop_t *i_ddi_prop_list_dup(ddi_prop_t *, uint_t);
+extern int i_ddi_load_drvconf(major_t);
+extern int i_ddi_unload_drvconf(major_t);
+extern ddi_node_state_t i_ddi_node_state(dev_info_t *);
+extern int i_ddi_devi_attached(dev_info_t *);
+extern void i_ddi_parse_name(char *, char **, char **, char **);
+extern void i_ddi_set_node_state(dev_info_t *, ddi_node_state_t);
+extern int i_ddi_detach_installed_driver(major_t, int);
+extern void i_ddi_set_binding_name(dev_info_t *, char *);
+extern void i_ddi_bind_devs(void);
+extern int i_ddi_unbind_devs_by_alias(major_t, char *);
+extern void i_ddi_unbind_devs(major_t);
+extern ddi_prop_list_t *i_ddi_prop_list_create(ddi_prop_t *);
struct devnames;
-void i_ddi_prop_list_hold(ddi_prop_list_t *, struct devnames *);
-void i_ddi_prop_list_rele(ddi_prop_list_t *, struct devnames *);
-ddi_prop_t *i_ddi_prop_search(dev_t, char *, uint_t, ddi_prop_t **);
-int resolve_pathname(char *, dev_info_t **, dev_t *, int *);
-int i_ddi_prompath_to_devfspath(char *, char *);
-int i_ddi_attach_node_hierarchy(dev_info_t *);
-dev_info_t *i_ddi_attach_pseudo_node(char *);
-int i_ddi_attach_hw_nodes(char *);
-int i_ddi_devs_attached(major_t);
-int i_ddi_minor_node_count(dev_info_t *, const char *);
-int ddi_is_pci_dip(dev_info_t *dip);
+extern void i_ddi_prop_list_hold(ddi_prop_list_t *, struct devnames *);
+extern void i_ddi_prop_list_rele(ddi_prop_list_t *, struct devnames *);
+extern ddi_prop_t *i_ddi_prop_search(dev_t, char *, uint_t, ddi_prop_t **);
+extern int resolve_pathname(char *, dev_info_t **, dev_t *, int *);
+extern int i_ddi_prompath_to_devfspath(char *, char *);
+extern int i_ddi_attach_node_hierarchy(dev_info_t *);
+extern dev_info_t *i_ddi_attach_pseudo_node(char *);
+extern int i_ddi_attach_hw_nodes(char *);
+extern int i_ddi_devs_attached(major_t);
+extern int i_ddi_minor_node_count(dev_info_t *, const char *);
+extern int ddi_is_pci_dip(dev_info_t *dip);
-/* non-DDI functions: wrapper around mod_hold/rele_dev_by_major() */
-struct dev_ops *ddi_hold_driver(major_t);
-void ddi_rele_driver(major_t);
+/*
+ * Non-DDI functions: wrapper around mod_hold/rele_dev_by_major()
+ */
+extern struct dev_ops *ddi_hold_driver(major_t);
+extern void ddi_rele_driver(major_t);
/*
* /etc/devices cache files management
*/
-void i_ddi_devices_init(void);
-void i_ddi_read_devices_files(void);
-void i_ddi_clean_devices_files(void);
+extern void i_ddi_devices_init(void);
+extern void i_ddi_read_devices_files(void);
+extern void i_ddi_clean_devices_files(void);
/*
* devid cache
*/
-void devid_cache_init(void);
-void devid_cache_read(void);
-void devid_cache_cleanup(void);
-int i_ddi_devi_get_devid(dev_t, dev_info_t *, ddi_devid_t *);
-int e_ddi_devid_discovery(ddi_devid_t);
-int e_devid_cache_register(dev_info_t *, ddi_devid_t);
-void e_devid_cache_unregister(dev_info_t *);
-int e_devid_cache_to_devt_list(ddi_devid_t, char *, int *, dev_t **);
-void e_devid_cache_free_devt_list(int, dev_t *);
+extern void devid_cache_init(void);
+extern void devid_cache_read(void);
+extern void devid_cache_cleanup(void);
+extern int i_ddi_devi_get_devid(dev_t, dev_info_t *, ddi_devid_t *);
+extern int e_ddi_devid_discovery(ddi_devid_t);
+extern int e_devid_cache_register(dev_info_t *, ddi_devid_t);
+extern void e_devid_cache_unregister(dev_info_t *);
+extern int e_devid_cache_to_devt_list(ddi_devid_t, char *, int *, dev_t **);
+extern void e_devid_cache_free_devt_list(int, dev_t *);
/*
* I/O retire persistent store
*/
-void retire_store_init(void);
-void retire_store_read(void);
-int e_ddi_retire_persist(char *devpath);
-int e_ddi_retire_unpersist(char *devpath);
-int e_ddi_device_retired(char *devpath);
+extern void retire_store_init(void);
+extern void retire_store_read(void);
+extern int e_ddi_retire_persist(char *);
+extern int e_ddi_retire_unpersist(char *);
+extern int e_ddi_device_retired(char *);
/*
- * Resource control functions to lock down device memory.
+ * Resource control functions to lock down device memory
*/
extern int i_ddi_incr_locked_memory(proc_t *, rctl_qty_t);
extern void i_ddi_decr_locked_memory(proc_t *, rctl_qty_t);