aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-05-20 14:23:13 -0700
committerBrian Behlendorf <[email protected]>2009-05-20 14:23:13 -0700
commit5232d256b45b3c48dd96d30b5907c0205192197b (patch)
tree82f3341f62d1e0d49c42fb1b4f3cd40e66515c7a /include
parent3731931529df2bff63ca3d62e387d4e602de7cb2 (diff)
SLES10 Fixes (part 6)
- Prior to 2.6.17 there were no *_pgdat helper functions in mm/mmzone.c. Instead for_each_zone() operated directly on pgdat_list which may or may not have been exported depending on how your kernel was compiled. Now new configure checks determine if you have the helpers or not, and if the needed symbols are exported. If they are not exported then they are dynamically aquired at runtime by kallsyms_lookup_name().
Diffstat (limited to 'include')
-rw-r--r--include/sys/vmsystm.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h
index 71058eef8..75365fde0 100644
--- a/include/sys/vmsystm.h
+++ b/include/sys/vmsystm.h
@@ -93,26 +93,34 @@ extern get_vmalloc_info_t get_vmalloc_info_fn;
#endif /* CONFIG_MMU */
#endif /* HAVE_GET_VMALLOC_INFO */
+#ifdef HAVE_PGDAT_HELPERS
/* Source linux/mm/mmzone.c */
-#ifndef HAVE_FIRST_ONLINE_PGDAT
+# ifndef HAVE_FIRST_ONLINE_PGDAT
typedef struct pglist_data *(*first_online_pgdat_t)(void);
extern first_online_pgdat_t first_online_pgdat_fn;
-#define first_online_pgdat() first_online_pgdat_fn()
-#endif /* HAVE_FIRST_ONLINE_PGDAT */
+# define first_online_pgdat() first_online_pgdat_fn()
+# endif /* HAVE_FIRST_ONLINE_PGDAT */
-/* Source linux/mm/mmzone.c */
-#ifndef HAVE_NEXT_ONLINE_PGDAT
+# ifndef HAVE_NEXT_ONLINE_PGDAT
typedef struct pglist_data *(*next_online_pgdat_t)(struct pglist_data *);
extern next_online_pgdat_t next_online_pgdat_fn;
-#define next_online_pgdat(pgd) next_online_pgdat_fn(pgd)
-#endif /* HAVE_NEXT_ONLINE_PGDAT */
+# define next_online_pgdat(pgd) next_online_pgdat_fn(pgd)
+# endif /* HAVE_NEXT_ONLINE_PGDAT */
-/* Source linux/mm/mmzone.c */
-#ifndef HAVE_NEXT_ZONE
+# ifndef HAVE_NEXT_ZONE
typedef struct zone *(*next_zone_t)(struct zone *);
extern next_zone_t next_zone_fn;
-#define next_zone(zone) next_zone_fn(zone)
-#endif /* HAVE_NEXT_ZONE */
+# define next_zone(zone) next_zone_fn(zone)
+# endif /* HAVE_NEXT_ZONE */
+
+#else /* HAVE_PGDAT_HELPERS */
+
+# ifndef HAVE_PGDAT_LIST
+extern struct pglist_data *pgdat_list_addr;
+# define pgdat_list pgdat_list_addr
+# endif /* HAVE_PGDAT_LIST */
+
+#endif /* HAVE_PGDAT_HELPERS */
/* Source linux/mm/vmstat.c */
#ifndef HAVE_ZONE_STAT_ITEM_FIA