Merge commit 'refs/top-bases/linux-have-uio-rw' into linux-have-uio-rw

This commit is contained in:
Brian Behlendorf 2009-01-09 11:31:48 -08:00
commit a4df8635db
2 changed files with 30 additions and 22 deletions

View File

@ -6,37 +6,24 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build
KERNELMAKE_PARAMS= KERNELMAKE_PARAMS=
dnl # Kernel build cpp flags # FIXME: Quiet warnings not covered by the gcc-* patches. We should
# FIXME: consider removing this as soon as we reasonably can
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wall -Wstrict-prototypes -Werror "
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-switch -Wno-unused -Wno-missing-braces "
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-unknown-pragmas -Wno-parentheses "
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-uninitialized -fno-strict-aliasing "
KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL " KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL "
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-unknown-pragmas " KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\" "
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$splsrc -I$splsrc/include -I$TOPDIR" KERNELCPPFLAGS="$KERNELCPPFLAGS -I$splsrc -I$splsrc/include -I$TOPDIR"
dnl # Required for pread() functionality an other GNU goodness
HOSTCFLAGS="$HOSTCFLAGS -ggdb -O2 -std=c99 "
HOSTCFLAGS="$HOSTCFLAGS -D_GNU_SOURCE -D__EXTENSIONS__ "
dnl # XXX: Quiet warnings not covered by the gcc-* patches
dnl # XXX: Remove once all the warnings are resolved
HOSTCFLAGS="$HOSTCFLAGS -Wno-switch -Wno-unused -Wno-missing-braces "
HOSTCFLAGS="$HOSTCFLAGS -Wno-unknown-pragmas -Wno-parentheses "
HOSTCFLAGS="$HOSTCFLAGS -Wno-uninitialized -fno-strict-aliasing "
dnl # Expected defines not covered by zfs_config.h or spl_config.h
HOSTCFLAGS="$HOSTCFLAGS -DHAVE_SPL -D_POSIX_PTHREAD_SEMANTICS "
HOSTCFLAGS="$HOSTCFLAGS -D_FILE_OFFSET_BITS=64 "
HOSTCFLAGS="$HOSTCFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT "
HOSTCFLAGS="$HOSTCFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\" "
dnl # Expected default include path
HOSTCFLAGS="$HOSTCFLAGS -I$TOPDIR "
if test "$kernelbuild" != "$kernelsrc"; then if test "$kernelbuild" != "$kernelsrc"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild" KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild"
fi fi
AC_SUBST(KERNELMAKE_PARAMS) AC_SUBST(KERNELMAKE_PARAMS)
AC_SUBST(KERNELCPPFLAGS) AC_SUBST(KERNELCPPFLAGS)
AC_SUBST(HOSTCFLAGS)
ZFS_AC_CONFIG_KERNEL_BIO_ARGS ZFS_AC_CONFIG_KERNEL_BIO_ARGS
]) ])

View File

@ -3101,15 +3101,27 @@ static struct dev_ops zfs_dev_ops = {
}; };
static struct modldrv zfs_modldrv = { static struct modldrv zfs_modldrv = {
#ifdef HAVE_SPL
NULL,
#else
&mod_driverops, &mod_driverops,
#endif /* HAVE_SPL */
"ZFS storage pool", "ZFS storage pool",
&zfs_dev_ops &zfs_dev_ops
}; };
static struct modlinkage modlinkage = { static struct modlinkage modlinkage = {
MODREV_1, MODREV_1,
#ifdef HAVE_ZPL
(void *)&zfs_modlfs, (void *)&zfs_modlfs,
#else
NULL,
#endif /* HAVE_ZPL */
(void *)&zfs_modldrv, (void *)&zfs_modldrv,
#ifdef HAVE_SPL
ZFS_MAJOR,
ZFS_MINORS,
#endif /* HAVE_SPL */
NULL NULL
}; };
@ -3172,8 +3184,17 @@ _fini(void)
return (error); return (error);
} }
#ifdef HAVE_SPL
module_init(_init);
module_exit(_fini);
MODULE_AUTHOR("Sun Microsystems, Inc");
MODULE_DESCRIPTION("ZFS");
MODULE_LICENSE("CDDL");
#else
int int
_info(struct modinfo *modinfop) _info(struct modinfo *modinfop)
{ {
return (mod_info(&modlinkage, modinfop)); return (mod_info(&modlinkage, modinfop));
} }
#endif /* HAVE_SPL */