linux: module: weld all but spl.ko into zfs.ko

Originally it was thought it would be useful to split up the kmods
by functionality.  This would allow external consumers to only load
what was needed.  However, in practice we've never had a case where
this functionality would be needed, and conversely managing multiple
kmods can be awkward.  Therefore, this change merges all but the
spl.ko kmod in to a single zfs.ko kmod.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13274
This commit is contained in:
наб
2022-03-31 17:20:50 +02:00
committed by Brian Behlendorf
parent 310ab9d261
commit ad9e767657
40 changed files with 518 additions and 749 deletions
-28
View File
@@ -1,28 +0,0 @@
ifneq ($(KBUILD_EXTMOD),)
src = @abs_srcdir@
obj = @abs_builddir@
endif
MODULE := zcommon
obj-$(CONFIG_ZFS) := $(MODULE).o
# Suppress unused-value warnings in sparc64 architecture headers
ccflags-$(CONFIG_SPARC64) += -Wno-unused-value
$(MODULE)-objs += cityhash.o
$(MODULE)-objs += zfeature_common.o
$(MODULE)-objs += zfs_comutil.o
$(MODULE)-objs += zfs_deleg.o
$(MODULE)-objs += zfs_fletcher.o
$(MODULE)-objs += zfs_fletcher_superscalar.o
$(MODULE)-objs += zfs_fletcher_superscalar4.o
$(MODULE)-objs += zfs_namecheck.o
$(MODULE)-objs += zfs_prop.o
$(MODULE)-objs += zpool_prop.o
$(MODULE)-objs += zprop_common.o
$(MODULE)-$(CONFIG_X86) += zfs_fletcher_intel.o
$(MODULE)-$(CONFIG_X86) += zfs_fletcher_sse.o
$(MODULE)-$(CONFIG_X86) += zfs_fletcher_avx512.o
$(MODULE)-$(CONFIG_ARM64) += zfs_fletcher_aarch64_neon.o
+7 -7
View File
@@ -1006,7 +1006,10 @@ uint8_t **zfs_kfpu_fpregs;
EXPORT_SYMBOL(zfs_kfpu_fpregs);
#endif /* defined(HAVE_KERNEL_FPU_INTERNAL) */
static int __init
extern int __init zcommon_init(void);
extern void zcommon_fini(void);
int __init
zcommon_init(void)
{
int error = kfpu_init();
@@ -1018,22 +1021,19 @@ zcommon_init(void)
return (0);
}
static void __exit
void
zcommon_fini(void)
{
fletcher_4_fini();
kfpu_fini();
}
#ifdef __FreeBSD__
module_init_early(zcommon_init);
module_exit(zcommon_fini);
#endif
ZFS_MODULE_DESCRIPTION("Generic ZFS support");
ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR);
ZFS_MODULE_LICENSE(ZFS_META_LICENSE);
ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
#endif
/* zfs dataset property functions */
EXPORT_SYMBOL(zfs_userquota_prop_prefixes);