Add linux kernel module support

Setup linux kernel module support, this includes:
- zfs context for kernel/user
- kernel module build system integration
- kernel module macros
- kernel module symbol export
- kernel module options

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 11:49:16 -07:00
parent 00b46022c6
commit c28b227942
40 changed files with 820 additions and 10 deletions
+17
View File
@@ -2131,3 +2131,20 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen,
return (ret_val);
}
#if defined(_KERNEL) && defined(HAVE_SPL)
static int unicode_init(void) { return 0; }
static int unicode_fini(void) { return 0; }
spl_module_init(unicode_init);
spl_module_exit(unicode_fini);
MODULE_DESCRIPTION("Unicode implementation");
MODULE_AUTHOR(ZFS_META_AUTHOR);
MODULE_LICENSE(ZFS_META_LICENSE);
EXPORT_SYMBOL(u8_validate);
EXPORT_SYMBOL(u8_strcmp);
EXPORT_SYMBOL(u8_textprep_str);
#endif
+9
View File
@@ -853,3 +853,12 @@ uconv_u8tou32(const uchar_t *u8s, size_t *utf8len,
return (0);
}
#if defined(_KERNEL) && defined(HAVE_SPL)
EXPORT_SYMBOL(uconv_u16tou32);
EXPORT_SYMBOL(uconv_u16tou8);
EXPORT_SYMBOL(uconv_u32tou16);
EXPORT_SYMBOL(uconv_u32tou8);
EXPORT_SYMBOL(uconv_u8tou16);
EXPORT_SYMBOL(uconv_u8tou32);
#endif