summaryrefslogtreecommitdiffstats
path: root/spl_config.h.in
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-25 13:20:40 -0800
committerBrian Behlendorf <[email protected]>2009-03-04 10:04:15 -0800
commitd1ff2312b05852d2190afd1da216b4e0e1b0c7d4 (patch)
tree758bd8754c8a730e769f3db8e55b799c0bddae48 /spl_config.h.in
parent4327ac3ff93b7aa47d20c184d34fb1f2202b7ab5 (diff)
Linux VM Integration Cleanup
Remove all instances of functions being reimplemented in the SPL. When the prototypes are available in the linux headers but the function address itself is not exported use kallsyms_lookup_name() to find the address. The function name itself can them become a define which calls a function pointer. This is preferable to reimplementing the function in the SPL because it ensures we get the correct version of the function for the running kernel. This is actually pretty safe because the prototype is defined in the headers so we know we are calling the function properly. This patch also includes a rhel5 kernel patch we exports the needed symbols so we don't need to use kallsyms_lookup_name(). There are autoconf checks to detect if the symbol is exported and if so to use it directly. We should add patches for stock upstream kernels as needed if for no other reason than so we can easily track which additional symbols we needed exported. Those patches can also be used by anyone willing to rebuild their kernel, but this should not be a requirement. The rhel5 version of the export-symbols patch has been applied to the chaos kernel. Additional fixes: 1) Implement vmem_size() function using get_vmalloc_info() 2) SPL_CHECK_SYMBOL_EXPORT macro updated to use $LINUX_OBJ instead of $LINUX because Module.symvers is a build product. When $LINUX_OBJ != $LINUX we will not properly detect exported symbols. 3) SPL_LINUX_COMPILE_IFELSE macro updated to add include2 and $LINUX/include search paths to allow proper compilation when the kernel target build directory is not the source directory.
Diffstat (limited to 'spl_config.h.in')
-rw-r--r--spl_config.h.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/spl_config.h.in b/spl_config.h.in
index 1b7c8abab..7e677708a 100644
--- a/spl_config.h.in
+++ b/spl_config.h.in
@@ -51,6 +51,9 @@
/* fls64() is available */
#undef HAVE_FLS64
+/* get_vmalloc_info() is available */
+#undef HAVE_GET_VMALLOC_INFO
+
/* get_zone_counts() is available */
#undef HAVE_GET_ZONE_COUNTS
@@ -63,6 +66,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* kallsyms_lookup_name() is available */
+#undef HAVE_KALLSYMS_LOOKUP_NAME
+
/* kmalloc_node() is available */
#undef HAVE_KMALLOC_NODE