summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-05-20 10:08:37 -0700
committerBrian Behlendorf <[email protected]>2009-05-20 10:08:37 -0700
commit96dded38442684319305082aa2ac7e25f7f414da (patch)
treea541f01e4f60b05adb9931088c2080f659003786 /include
parentbf338d8d09b410884be526ed4f11b6030244dbfa (diff)
SLES10 Fixes (part 2):
- Configure check, the div64_64() function was renamed to div64_u64() as of 2.6.26. - Configure check, the global_page_state() fuction was introduced in 2.6.18 kernels. The earlier 2.6.16 based SLES10 must not try and use it, thankfully get_zone_counts() is still available. - To simplify debugging poison all symbols aquired dynamically using spl_kallsyms_lookup_name() with SYMBOL_POISON. - Add console messages when the user mode helpers fail. - spl_kmem_init_globals() use bit shifts instead of division. - When the monotonic clock is unavailable __gethrtime() must perform the HZ division as an 'unsigned long long' because the SPL only implements __udivdi3(), and not __divdi3() for 'long long' division on 32-bit arches.
Diffstat (limited to 'include')
-rw-r--r--include/linux/kallsyms_compat.h2
-rw-r--r--include/sys/vmsystm.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/kallsyms_compat.h b/include/linux/kallsyms_compat.h
index 82abed41d..6cd0a18de 100644
--- a/include/linux/kallsyms_compat.h
+++ b/include/linux/kallsyms_compat.h
@@ -1,6 +1,8 @@
#ifndef _SPL_KALLSYMS_COMPAT_H
#define _SPL_KALLSYMS_COMPAT_H
+#define SYMBOL_POISON ((void*)0xabcddcba)
+
#ifdef HAVE_KALLSYMS_LOOKUP_NAME
#include <linux/kallsyms.h>
diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h
index 123005e5e..71058eef8 100644
--- a/include/sys/vmsystm.h
+++ b/include/sys/vmsystm.h
@@ -121,15 +121,13 @@ typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *,
unsigned long *);
extern get_zone_counts_t get_zone_counts_fn;
# define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f)
+# endif /* HAVE_GET_ZONE_COUNTS */
extern unsigned long spl_global_page_state(int);
/* Defines designed to simulate enum but large enough to ensure no overlap */
# define NR_FREE_PAGES 0x8001
# define NR_INACTIVE 0x8002
# define NR_ACTIVE 0x8003
-# else
-# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable"
-# endif /* HAVE_GET_ZONE_COUNTS */
#else
#define spl_global_page_state(item) global_page_state(item)
#endif /* HAVE_ZONE_STAT_ITEM_FIA */